jvcllaz: Add component editor for TJvXPBar. Add ImageIndex property editor for TJvXPBarItem.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5413 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-12-04 22:43:34 +00:00
parent 5f6ac82f68
commit c2391e60b5
5 changed files with 48 additions and 18 deletions

View File

@ -11,7 +11,7 @@
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\resource"/>
<OtherUnitFiles Value="..\run"/>
<OtherUnitFiles Value="..\run;..\design"/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
@ -24,7 +24,7 @@
"/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="1"/>
<Files Count="7">
<Files Count="8">
<Item1>
<Filename Value="..\run\JvXPCoreUtils.pas"/>
<UnitName Value="JvXPCoreUtils"/>
@ -54,18 +54,25 @@
<HasRegisterProc Value="True"/>
<UnitName Value="JvXPCtrlsReg"/>
</Item7>
<Item8>
<Filename Value="..\design\JvXPPropertyEditors.pas"/>
<UnitName Value="JvXPPropertyEditors"/>
</Item8>
</Files>
<RequiredPkgs Count="3">
<RequiredPkgs Count="4">
<Item1>
<PackageName Value="JvCoreLaz"/>
<PackageName Value="IDEIntf"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<PackageName Value="JvCoreLaz"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
<Item4>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item3>
</Item4>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>

View File

@ -9,7 +9,7 @@ interface
uses
JvXPCoreUtils, JvXPBar, JvXPCore, JvXPContainer, JvXPButtons,
JvXPCheckCtrls, JvXPCtrlsReg, LazarusPackageIntf;
JvXPCheckCtrls, JvXPCtrlsReg, JvXPPropertyEditors, LazarusPackageIntf;
implementation

View File

@ -12,7 +12,9 @@ procedure Register;
implementation
uses
JvXPCore, JvXPBar, JvXPContainer, JvXPButtons, JvXPCheckCtrls;
ComponentEditors, PropEdits, GraphPropEdits, ImgList,
JvXPCore, JvXPPropertyEditors,
JvXPBar, JvXPContainer, JvXPButtons, JvXPCheckCtrls;
procedure Register;
begin
@ -24,6 +26,16 @@ begin
TJvXPCheckbox,
TJvXPStyleManager
]);
{
RegisterPropertyEditor(TypeInfo(TImageIndex), TJvXPBarItem, 'ImageIndex',
TJvXPItemImageIndexProperty);
}
RegisterPropertyEditor(TypeInfo(TImageIndex), TJvXPBarItem, 'ImageIndex',
TImageIndexPropertyEditor);
RegisterComponentEditor(TJvXPBar, TJvXPBarItemEditor);
end;
initialization

View File

@ -60,8 +60,7 @@ type
TJvXPBarRollMode = (rmFixed, rmShrink); // rmFixed is default
TJvXPBarHitTest =
(
TJvXPBarHitTest = (
htNone, // mouse is inside non-supported rect
htHeader, // mouse is inside header
htRollButton // mouse is inside rollbutton
@ -89,6 +88,9 @@ const
dxColor_FocusedFrameColorXP = clHotLight;
dxColor_CheckedFrameColorXP = clHighlight;
dxColor_FontColorXP = TColor($00840000);
dxColor_HeaderFontColorXP = TColor($00840000);
type
TJvXPBarItem = class;
TJvXPBarItems = class;
@ -1310,6 +1312,7 @@ begin
Self.CheckedFrameColor := CheckedFrameColor;
Self.FocusedFrameColor := FocusedFrameColor;
Self.BodyColor := BodyColor;
Self.BodyBorderColor := BodyBorderColor;
Self.GradientTo := GradientTo;
Self.GradientFrom := GradientFrom;
Self.SeparatorColor := SeparatorColor;
@ -1439,14 +1442,14 @@ begin
FTopSpace := 5;
FFont := TFont.Create;
FFont.Color := $00840000;
FFont.Color := dxColor_FontColorXP; //$00840000;
FFont.Size := 0; //8;
FFont.OnChange := @FontChange;
FHeaderHeight := 28;
FHeaderRounded := True;
FGradientWidth := 0;
FHeaderFont := TFont.Create;
FHeaderFont.Color := $00840000;
FHeaderFont.Color := dxColor_HeaderFontColorXP; //$00840000;
FHeaderFont.Size := 0; //8;
FHeaderFont.Style := [fsBold];
FHeaderFont.OnChange := @FontChange;
@ -1696,13 +1699,13 @@ begin
begin
FFontChanging := True;
try
FFont.Color := $00E75100;
FFont.Name := inherited Font.Name;
FFont.Size := 8;
FFont.Color := dxColor_FontColorXP;
FFont.Name := 'default';
FFont.Size := 0;
FFont.Style := inherited Font.Style;
FHeaderFont.Color := $00E75100;
FHeaderFont.Name := Font.Name;
FHeaderFont.Size := 8;
FHeaderFont.Color := dxColor_HeaderFontColorXP;
FHeaderFont.Name := 'default';
FHeaderFont.Size := 0;
FHeaderFont.Style := [fsBold];
finally
FFontChanging := False;

View File

@ -151,6 +151,7 @@ type
procedure CMMouseEnter(var Msg: TLMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var Msg: TLMessage); message CM_MOUSELEAVE;
procedure CMParentColorChanged(var Msg: TLMessage); message CM_PARENTCOLORCHANGED;
procedure CMParentFontChanged(var Msg: TLMessage); message CM_PARENTFONTCHANGED;
//LCL doesnt fire it
//procedure CMParentFontChanged(var Msg: TLMessage); message CM_PARENTFONTCHANGED;
@ -439,6 +440,13 @@ begin
HookParentColorChanged;
end;
procedure TJvXPCustomControl.CMParentFontChanged(var Msg: TLMessage);
begin
// delegate message "ParentFontChanged" to hook.
inherited;
HookParentFontChanged;
end;
//LCL doesnt fire it...
(*
procedure TJvXPCustomControl.CMParentFontChanged(var Msg: TLMessage);