SpkToolbar: new property HotTrackBrightnessChange of Element.Appearance.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5368 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-11-18 22:16:36 +00:00
parent bbe5b1e8a3
commit 2188bdf375
5 changed files with 145 additions and 46 deletions

View File

@ -129,6 +129,7 @@ type TSpkPaneAppearance = class(TPersistent)
FHotTrackInnerLightColor: TColor;
FHotTrackInnerDarkColor: TColor;
FHotTrackCaptionColor: TColor;
FHotTrackBrightnessChange: Integer;
FActiveFrameColor: TColor;
FActiveGradientFromColor: TColor;
FActiveGradientToColor: TColor;
@ -152,6 +153,7 @@ type TSpkPaneAppearance = class(TPersistent)
procedure SetHotTrackGradientType(const Value: TBackgroundKind);
procedure SetHotTrackInnerDarkColor(const Value: TColor);
procedure SetHotTrackInnerLightColor(const Value: TColor);
procedure SetHotTrackBrightnessChange(const Value: Integer);
procedure SetIdleCaptionColor(const Value: TColor);
procedure SetIdleFrameColor(const Value: TColor);
procedure SetIdleGradientFromColor(const Value: TColor);
@ -184,6 +186,7 @@ type TSpkPaneAppearance = class(TPersistent)
property HotTrackInnerLightColor: TColor read FHotTrackInnerLightColor write SetHotTrackInnerLightColor;
property HotTrackInnerDarkColor: TColor read FHotTrackInnerDarkColor write SetHotTrackInnerDarkColor;
property HotTrackCaptionColor: TColor read FHotTrackCaptionColor write SetHotTrackCaptionColor;
property HotTrackBrightnessChange: Integer read FHotTrackBrightnessChange write SetHotTrackBrightnessChange default 20;
property ActiveFrameColor: TColor read FActiveFrameColor write SetActiveFrameColor;
property ActiveGradientFromColor: TColor read FActiveGradientFromColor write SetActiveGradientFromColor;
property ActiveGradientToColor: TColor read FActiveGradientToColor write SetActiveGradientToColor;
@ -755,6 +758,7 @@ begin
FHotTrackInnerLightColor := SrcAppearance.HotTrackInnerLightColor;
FHotTrackInnerDarkColor := SrcAppearance.HotTrackInnerDarkColor;
FHotTrackCaptionColor := SrcAppearance.HotTrackCaptionColor;
FHotTrackBrightnessChange := SrcAppearance.HotTrackBrightnessChange;
FActiveFrameColor := SrcAppearance.ActiveFrameColor;
FActiveGradientFromColor := SrcAppearance.ActiveGradientFromColor;
FActiveGradientToColor := SrcAppearance.ActiveGradientToColor;
@ -775,6 +779,7 @@ begin
inherited Create;
FDispatch := ADispatch;
FCaptionFont := TFont.Create;
FHotTrackBrightnessChange := 40;
Reset;
end;
@ -824,7 +829,7 @@ begin
if Assigned(Subnode) then
FIdleCaptionColor := Subnode.TextAsColor;
// Hottrack
// HotTrack
Subnode := Node['HottrackFrameColor', false];
if Assigned(Subnode) then
FHottrackFrameColor := Subnode.TextAsColor;
@ -853,6 +858,10 @@ begin
if Assigned(Subnode) then
FHottrackCaptionColor := Subnode.TextAsColor;
Subnode := Node['HottrackBrightnessChange', false];
if Assigned(Subnode) then
FHottrackBrightnessChange := Subnode.TextAsInteger;
// Active
Subnode := Node['ActiveFrameColor', false];
if Assigned(Subnode) then
@ -909,6 +918,7 @@ begin
FHotTrackInnerLightColor := rgb(255, 241, 197);
FHotTrackInnerDarkColor := rgb(216, 194, 122);
FHotTrackCaptionColor := rgb(111, 66, 135);
FHotTrackBrightnessChange := 40;
FActiveFrameColor := rgb(139, 118, 84);
FActiveGradientFromColor := rgb(254, 187, 108);
FActiveGradientToColor := rgb(252, 146, 61);
@ -931,6 +941,7 @@ begin
FIdleInnerDarkColor := $00C7C0BA;
FIdleInnerLightColor := $00F6F2F0;
FIdleCaptionColor := $0060655F;
FHotTrackBrightnessChange := 40;
FHotTrackFrameColor := $009BCFDD;
FHotTrackGradientFromColor := $00DAFCFF;
FHotTrackGradientToColor := $004DD7FF;
@ -982,6 +993,7 @@ begin
FHotTrackInnerDarkColor := $00F7EFE8;
FHotTrackInnerLightColor := $00F7EFE8;
FHotTrackCaptionColor := $003F3F3F;
FHotTrackBrightnessChange := 20;
FActiveFrameColor := $00E4A262;
FActiveGradientFromColor := $00F7E0C9;
FActiveGradientToColor := $00F7E0C9;
@ -1010,6 +1022,7 @@ begin
FHotTrackInnerDarkColor := $00805B3D;
FHotTrackInnerLightColor := $00805B3D;
FHotTrackCaptionColor := $00F2F2F2;
FHotTrackBrightnessChange := 10;
FActiveFrameColor := $00000000;
FActiveGradientFromColor := $00000000;
FActiveGradientToColor := $00000000;
@ -1043,6 +1056,7 @@ begin
Add(' HotTrackInnerDarkColor := $' + IntToHex(FHotTrackInnerDarkColor, 8) + ';');
Add(' HotTrackInnerLightColor := $' + IntToHex(FHotTrackInnerLightColor, 8) + ';');
Add(' HotTrackCaptionColor := $' + IntToHex(FHotTrackCaptionColor, 8) + ';');
Add(' HotTrackBrightnessChange := ' + IntToStr(FHotTrackBrightnessChange) + ';');
Add(' ActiveFrameColor := $' + IntToHex(FActiveFrameColor, 8) + ';');
Add(' ActiveGradientFromColor := $' + IntToHex(FActiveGradientFromColor, 8) + ';');
@ -1067,7 +1081,7 @@ begin
Subnode := Node['CaptionFont', true];
TSpkXMLTools.Save(Subnode, FCaptionFont);
// *** Idle ***
// Idle
Subnode := Node['IdleFrameColor', true];
Subnode.TextAsColor := FIdleFrameColor;
@ -1089,7 +1103,7 @@ begin
Subnode := Node['IdleCaptionColor', true];
Subnode.TextAsColor := FIdleCaptionColor;
// *** Hottrack ***
// HotTrack
Subnode := Node['HottrackFrameColor', true];
Subnode.TextAsColor := FHottrackFrameColor;
@ -1111,7 +1125,10 @@ begin
Subnode := Node['HottrackCaptionColor', true];
Subnode.TextAsColor := FHottrackCaptionColor;
// *** Active ***
Subnode := Node['HottrackBrightnessChange', true];
Subnode.TextAsInteger := FHotTrackBrightnessChange;
// Active
Subnode := Node['ActiveFrameColor', true];
Subnode.TextAsColor := FActiveFrameColor;
@ -1133,6 +1150,7 @@ begin
Subnode := Node['ActiveCaptionColor', true];
Subnode.TextAsColor := FActiveCaptionColor;
// Other
Subnode := Node['Style', true];
Subnode.TextAsInteger := integer(FStyle);
end;
@ -1140,154 +1158,161 @@ end;
procedure TSpkElementAppearance.SetActiveCaptionColor(const Value: TColor);
begin
FActiveCaptionColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveFrameColor(const Value: TColor);
begin
FActiveFrameColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveGradientFromColor(const Value: TColor);
begin
FActiveGradientFromColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveGradientToColor(const Value: TColor);
begin
FActiveGradientToColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveGradientType(const Value: TBackgroundKind);
begin
FActiveGradientType := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveInnerDarkColor(const Value: TColor);
begin
FActiveInnerDarkColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetActiveInnerLightColor(const Value: TColor);
begin
FActiveInnerLightColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetCaptionFont(const Value: TFont);
begin
FCaptionFont.assign(Value);
if FDispatch<>nil then
FCaptionFont.Assign(Value);
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackBrightnessChange(const Value: Integer);
begin
FHotTrackBrightnessChange := Value;
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackCaptionColor(const Value: TColor);
begin
FHotTrackCaptionColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackFrameColor(const Value: TColor);
begin
FHotTrackFrameColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackGradientFromColor(const Value: TColor);
begin
FHotTrackGradientFromColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackGradientToColor(const Value: TColor);
begin
FHotTrackGradientToColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackGradientType(const Value: TBackgroundKind);
begin
FHotTrackGradientType := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackInnerDarkColor(const Value: TColor);
begin
FHotTrackInnerDarkColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetHotTrackInnerLightColor(const Value: TColor);
begin
FHotTrackInnerLightColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleCaptionColor(const Value: TColor);
begin
FIdleCaptionColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleFrameColor(const Value: TColor);
begin
FIdleFrameColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleGradientFromColor(const Value: TColor);
begin
FIdleGradientFromColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleGradientToColor(const Value: TColor);
begin
FIdleGradientToColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleGradientType(const Value: TBackgroundKind);
begin
FIdleGradientType := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleInnerDarkColor(const Value: TColor);
begin
FIdleInnerDarkColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
procedure TSpkElementAppearance.SetIdleInnerLightColor(const Value: TColor);
begin
FIdleInnerLightColor := Value;
if FDispatch<>nil then
if FDispatch <> nil then
FDispatch.NotifyAppearanceChanged;
end;
@ -1303,8 +1328,8 @@ end;
constructor TSpkToolbarAppearanceDispatch.Create(
AToolbarAppearance: TSpkToolbarAppearance);
begin
inherited Create;
FToolbarAppearance:=AToolbarAppearance;
inherited Create;
FToolbarAppearance := AToolbarAppearance;
end;
procedure TSpkToolbarAppearanceDispatch.NotifyAppearanceChanged;

View File

@ -48,6 +48,7 @@ type TSpkBaseButton = class;
function IsVisibleLinked: Boolean; override;
end;
{ TSpkBaseButton }
TSpkBaseButton = class abstract(TSpkBaseItem)
@ -115,7 +116,10 @@ type TSpkBaseButton = class;
property OnClick : TNotifyEvent read FOnClick write FOnClick;
end;
type TSpkLargeButton = class(TSpkBaseButton)
{ TSpkLargeButton }
TSpkLargeButton = class(TSpkBaseButton)
private
FLargeImageIndex: TImageIndex;
procedure FindBreakPlace(s: string; out Position: integer; out Width: integer);
@ -136,7 +140,10 @@ type TSpkLargeButton = class(TSpkBaseButton)
property DropdownMenu;
end;
type TSpkSmallButton = class(TSpkBaseButton)
{ TSpkSmallButton }
TSpkSmallButton = class(TSpkBaseButton)
private
FImageIndex: TImageIndex;
FTableBehaviour: TSpkItemTableBehaviour;
@ -775,7 +782,7 @@ begin
if (FRect.Width < 2*LargeButtonRadius) or (FRect.Height < 2*LargeButtonRadius) then
exit;
delta := 40;
delta := FAppearance.Element.HotTrackBrightnessChange;
case FAppearance.Element.Style of
esRounded:
cornerRadius := LargeButtonRadius;
@ -1295,6 +1302,7 @@ begin
if (FRect.Width < 2*SmallButtonRadius) or (FRect.Height < 2*SmallButtonRadius) then
exit;
delta := FAppearance.Element.HotTrackBrightnessChange;
case FAppearance.Element.Style of
esRounded:
cornerRadius := SmallButtonRadius;
@ -1333,7 +1341,6 @@ begin
end else
if (FButtonState in [bsDropdownHotTrack, bsDropdownPressed]) then
begin
delta := 40;
frameColor := TColorTools.Brighten(FAppearance.Element.HotTrackFrameColor, delta);
innerDarkColor := TColorTools.Brighten(FAppearance.Element.HotTrackInnerDarkColor, delta);
innerLightColor := TColorTools.Brighten(FAppearance.Element.HotTrackInnerLightColor, delta);
@ -1436,7 +1443,6 @@ begin
end else
if (FButtonState in [bsBtnHottrack, bsBtnPressed]) then
begin
delta := 40;
frameColor := TColorTools.Brighten(FAppearance.Element.HotTrackFrameColor, delta);
innerLightColor := TColorTools.Brighten(FAppearance.Element.HotTrackInnerLightColor, delta);
innerDarkColor := TColorTools.Brighten(FAppearance.Element.HotTrackInnerDarkColor, delta);

View File

@ -3,7 +3,7 @@ object Form1: TForm1
Height = 660
Top = 130
Width = 506
Caption = 'Form1'
Caption = 'spkToolbar Styles'
ClientHeight = 660
ClientWidth = 506
Color = clMedGray
@ -47,6 +47,7 @@ object Form1: TForm1
Appearance.Element.HotTrackInnerLightColor = 12972543
Appearance.Element.HotTrackInnerDarkColor = 8045272
Appearance.Element.HotTrackCaptionColor = 8864367
Appearance.Element.HotTrackBrightnessChange = 40
Appearance.Element.ActiveFrameColor = 5535371
Appearance.Element.ActiveGradientFromColor = 7126014
Appearance.Element.ActiveGradientToColor = 4035324
@ -96,6 +97,7 @@ object Form1: TForm1
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -271,6 +273,7 @@ object Form1: TForm1
Appearance.Element.HotTrackInnerLightColor = 12972543
Appearance.Element.HotTrackInnerDarkColor = 8045272
Appearance.Element.HotTrackCaptionColor = 8864367
Appearance.Element.HotTrackBrightnessChange = 40
Appearance.Element.ActiveFrameColor = 5535371
Appearance.Element.ActiveGradientFromColor = 7126014
Appearance.Element.ActiveGradientToColor = 4035324
@ -320,6 +323,7 @@ object Form1: TForm1
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -495,6 +499,7 @@ object Form1: TForm1
Appearance.Element.HotTrackInnerLightColor = 16445385
Appearance.Element.HotTrackInnerDarkColor = 12687889
Appearance.Element.HotTrackCaptionColor = 8864367
Appearance.Element.HotTrackBrightnessChange = 40
Appearance.Element.ActiveFrameColor = 7823883
Appearance.Element.ActiveGradientFromColor = 16046978
Appearance.Element.ActiveGradientToColor = 15516990
@ -544,6 +549,7 @@ object Form1: TForm1
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -770,6 +776,7 @@ object Form1: TForm1
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -947,6 +954,7 @@ object Form1: TForm1
Appearance.Element.HotTrackInnerLightColor = 8411965
Appearance.Element.HotTrackInnerDarkColor = 8411965
Appearance.Element.HotTrackCaptionColor = 15921906
Appearance.Element.HotTrackBrightnessChange = 10
Appearance.Element.ActiveFrameColor = clBlack
Appearance.Element.ActiveGradientFromColor = clBlack
Appearance.Element.ActiveGradientToColor = clBlack
@ -996,6 +1004,7 @@ object Form1: TForm1
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324

View File

@ -64,6 +64,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Appearance.Element.HotTrackInnerLightColor = 12972543
Appearance.Element.HotTrackInnerDarkColor = 8045272
Appearance.Element.HotTrackCaptionColor = 8864367
Appearance.Element.HotTrackBrightnessChange = 40
Appearance.Element.ActiveFrameColor = 5535371
Appearance.Element.ActiveGradientFromColor = 7126014
Appearance.Element.ActiveGradientToColor = 4035324
@ -114,6 +115,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -304,6 +306,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
CustomAppearance.Element.HotTrackInnerLightColor = 12972543
CustomAppearance.Element.HotTrackInnerDarkColor = 8045272
CustomAppearance.Element.HotTrackCaptionColor = 8864367
CustomAppearance.Element.HotTrackBrightnessChange = 40
CustomAppearance.Element.ActiveFrameColor = 5535371
CustomAppearance.Element.ActiveGradientFromColor = 7126014
CustomAppearance.Element.ActiveGradientToColor = 4035324
@ -324,9 +327,9 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Height = 395
Top = 132
Width = 558
ActivePage = TabSheet5
ActivePage = TabSheet2
Align = alClient
TabIndex = 4
TabIndex = 1
TabOrder = 1
object TabSheet1: TTabSheet
Caption = 'Tab'
@ -940,7 +943,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
end
object pPaneCaptionFontColor: TPanel
AnchorSideLeft.Control = pPaneCaptionBackground
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
AnchorSideTop.Control = edPaneHotTrackBrightnessChange
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = pPaneCaptionBackground
AnchorSideRight.Side = asrBottom
@ -1138,7 +1141,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Shape = bsSpacer
end
object Label15: TLabel
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
AnchorSideTop.Control = edPaneHotTrackBrightnessChange
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LblPaneCaptionBackground
AnchorSideRight.Side = asrBottom
@ -1151,7 +1154,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Caption = 'HotTrack brightness'#13#10'change'
ParentColor = False
end
object ePaneHotTrackBrightnessChange: TSpinEdit
object edPaneHotTrackBrightnessChange: TSpinEdit
AnchorSideLeft.Control = pPaneCaptionBackground
AnchorSideTop.Control = pPaneCaptionBackground
AnchorSideTop.Side = asrBottom
@ -1165,13 +1168,13 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
MinValue = -100
OnChange = ePaneHotTrackBrightnessChangeChange
OnChange = edPaneHotTrackBrightnessChangeChange
TabOrder = 10
end
object Label16: TLabel
AnchorSideLeft.Control = ePaneHotTrackBrightnessChange
AnchorSideLeft.Control = edPaneHotTrackBrightnessChange
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
AnchorSideTop.Control = edPaneHotTrackBrightnessChange
AnchorSideTop.Side = asrCenter
Left = 247
Height = 15
@ -2171,6 +2174,48 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
Anchors = [akTop, akLeft, akBottom]
Shape = bsSpacer
end
object Label19: TLabel
AnchorSideLeft.Control = edItemHotTrackBrightnessChange
AnchorSideBottom.Control = edItemHotTrackBrightnessChange
Left = 259
Height = 15
Top = 285
Width = 97
Alignment = taRightJustify
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 4
Caption = 'Brightness change'
ParentColor = False
end
object edItemHotTrackBrightnessChange: TSpinEdit
AnchorSideLeft.Control = pItemHottrackInnerLight
AnchorSideTop.Control = cbItemStyle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = pItemHottrackInnerLight
AnchorSideRight.Side = asrBottom
Left = 259
Height = 23
Top = 304
Width = 100
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
MinValue = -100
OnChange = edItemHotTrackBrightnessChangeChange
TabOrder = 24
end
object Label20: TLabel
AnchorSideLeft.Control = edItemHotTrackBrightnessChange
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edItemHotTrackBrightnessChange
AnchorSideTop.Side = asrCenter
Left = 363
Height = 15
Top = 308
Width = 10
BorderSpacing.Left = 4
Caption = '%'
ParentColor = False
end
end
object TabSheet4: TTabSheet
Caption = 'Import / export'

View File

@ -19,9 +19,12 @@ type
CbAppearanceStyle: TComboBox;
Label15: TLabel;
Label16: TLabel;
Label19: TLabel;
Label20: TLabel;
PaneHSpacer: TBevel;
ItemHSpacer: TBevel;
ePaneHotTrackBrightnessChange: TSpinEdit;
edPaneHotTrackBrightnessChange: TSpinEdit;
edItemHotTrackBrightnessChange: TSpinEdit;
TabVSpacer: TBevel;
bInactiveTabHeaderFontColor: TSpeedButton;
bItemActiveInnerDarkColor: TSpeedButton;
@ -214,7 +217,8 @@ type
procedure cbLinkItemClick(Sender: TObject);
procedure cbLinkPaneClick(Sender: TObject);
procedure cbLinkTabClick(Sender: TObject);
procedure ePaneHotTrackBrightnessChangeChange(Sender: TObject);
procedure edItemHotTrackBrightnessChangeChange(Sender: TObject);
procedure edPaneHotTrackBrightnessChangeChange(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
@ -808,7 +812,15 @@ begin
Result := false;
end;
procedure TfrmAppearanceEditWindow.ePaneHotTrackBrightnessChangeChange(
procedure TfrmAppearanceEditWindow.edItemHotTrackBrightnessChangeChange(
Sender: TObject);
begin
with tbPreview.Appearance.Element do
HotTrackBrightnessChange := (Sender as TSpinEdit).Value;
tbPreview.Invalidate;
end;
procedure TfrmAppearanceEditWindow.edPaneHotTrackBrightnessChangeChange(
Sender: TObject);
begin
with tbPreview.Appearance.Pane do
@ -945,6 +957,7 @@ begin
SetPanelFont(pPaneCaptionFont, CaptionFont);
SetPanelColor(pPaneCaptionFontColor, CaptionFont.Color);
cbPaneStyle.ItemIndex := ord(Style);
edPaneHotTrackBrightnessChange.Value := HotTrackBrightnessChange;
end;
with Element do
@ -976,6 +989,7 @@ begin
SetPanelColor(pItemActiveInnerLight, ActiveInnerLightColor);
cbItemStyle.ItemIndex := ord(Style);
edItemHotTrackBrightnessChange.Value := HotTrackBrightnessChange;
end;
end;
end;