You've already forked lazarus-ccr
SpkToolbar: Add new property "HotTrackBrightnessChange" to Pane.Appearance.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5365 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -46,8 +46,8 @@ type
|
|||||||
TColorTools = class
|
TColorTools = class
|
||||||
public
|
public
|
||||||
class function Darken(AColor: TColor; APercentage: byte): TColor;
|
class function Darken(AColor: TColor; APercentage: byte): TColor;
|
||||||
class function Brighten(AColor: TColor; APercentage: byte): TColor;
|
class function Brighten(AColor: TColor; APercentage: Integer): TColor;
|
||||||
class function Shade(AColor1, AColor2: TColor; APercentage: byte): TColor; overload;
|
class function Shade(AColor1, AColor2: TColor; APercentage: Integer): TColor; overload;
|
||||||
class function Shade(AColor1, AColor2: TColor; AStep: extended): TColor; overload;
|
class function Shade(AColor1, AColor2: TColor; AStep: extended): TColor; overload;
|
||||||
class function AddColors(AColor1, AColor2: TColor): TColor;
|
class function AddColors(AColor1, AColor2: TColor): TColor;
|
||||||
class function MultiplyColors(AColor1, AColor2: TColor): TColor;
|
class function MultiplyColors(AColor1, AColor2: TColor): TColor;
|
||||||
@ -111,7 +111,7 @@ begin
|
|||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TColorTools.Brighten(AColor: TColor; APercentage: byte): TColor;
|
class function TColorTools.Brighten(AColor: TColor; APercentage: Integer): TColor;
|
||||||
var
|
var
|
||||||
c: TRgbColor;
|
c: TRgbColor;
|
||||||
p: Extended;
|
p: Extended;
|
||||||
@ -119,14 +119,14 @@ begin
|
|||||||
c := TRgbColor(ColorToRGB(AColor));
|
c := TRgbColor(ColorToRGB(AColor));
|
||||||
p := APercentage/100;
|
p := APercentage/100;
|
||||||
result := rgb(
|
result := rgb(
|
||||||
round(c.R + (255-c.R)*p),
|
EnsureRange(round(c.R + (255-c.R)*p), 0, 255),
|
||||||
round(c.G + (255-c.G)*p),
|
EnsureRange(round(c.G + (255-c.G)*p), 0, 255),
|
||||||
round(c.B + (255-c.B)*p)
|
EnsureRange(round(c.B + (255-c.B)*p), 0, 255)
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TColorTools.Shade(AColor1, AColor2: TColor;
|
class function TColorTools.Shade(AColor1, AColor2: TColor;
|
||||||
APercentage: byte): TColor;
|
APercentage: Integer): TColor;
|
||||||
var
|
var
|
||||||
c1, c2: TRgbColor;
|
c1, c2: TRgbColor;
|
||||||
Step: Extended; // percentage as floating point number
|
Step: Extended; // percentage as floating point number
|
||||||
@ -135,9 +135,9 @@ begin
|
|||||||
c2 := TRGBColor(ColorToRGB(AColor2));
|
c2 := TRGBColor(ColorToRGB(AColor2));
|
||||||
Step := APercentage / 100;
|
Step := APercentage / 100;
|
||||||
result := rgb(
|
result := rgb(
|
||||||
round(c1.R + (c2.R - c1.R) * Step),
|
EnsureRange(round(c1.R + (c2.R - c1.R) * Step), 0, 255),
|
||||||
round(c1.G + (c2.G - c1.G) * Step),
|
EnsureRange(round(c1.G + (c2.G - c1.G) * Step), 0, 255),
|
||||||
round(c1.B + (c2.B - c1.B) * Step)
|
EnsureRange(round(c1.B + (c2.B - c1.B) * Step), 0, 255)
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ type TSpkPaneAppearance = class(TPersistent)
|
|||||||
FGradientFromColor: TColor;
|
FGradientFromColor: TColor;
|
||||||
FGradientToColor: TColor;
|
FGradientToColor: TColor;
|
||||||
FGradientType: TBackgroundKind;
|
FGradientType: TBackgroundKind;
|
||||||
|
FHotTrackBrightnessChange: Integer;
|
||||||
FStyle: TSpkPaneStyle;
|
FStyle: TSpkPaneStyle;
|
||||||
procedure SetCaptionBgColor(const Value: TColor);
|
procedure SetCaptionBgColor(const Value: TColor);
|
||||||
procedure SetCaptionFont(const Value: TFont);
|
procedure SetCaptionFont(const Value: TFont);
|
||||||
@ -84,6 +85,7 @@ type TSpkPaneAppearance = class(TPersistent)
|
|||||||
procedure SetGradientFromColor(const Value: TColor);
|
procedure SetGradientFromColor(const Value: TColor);
|
||||||
procedure SetGradientToColor(const Value: TColor);
|
procedure SetGradientToColor(const Value: TColor);
|
||||||
procedure SetGradientType(const Value: TBackgroundKind);
|
procedure SetGradientType(const Value: TBackgroundKind);
|
||||||
|
procedure SetHotTrackBrightnessChange(const Value: Integer);
|
||||||
procedure SetStyle(const Value: TSpkPaneStyle);
|
procedure SetStyle(const Value: TSpkPaneStyle);
|
||||||
public
|
public
|
||||||
constructor Create(ADispatch: TSpkBaseAppearanceDispatch);
|
constructor Create(ADispatch: TSpkBaseAppearanceDispatch);
|
||||||
@ -101,10 +103,11 @@ type TSpkPaneAppearance = class(TPersistent)
|
|||||||
property GradientFromColor: TColor read FGradientFromColor write SetGradientFromColor;
|
property GradientFromColor: TColor read FGradientFromColor write SetGradientFromColor;
|
||||||
property GradientToColor: TColor read FGradientToColor write SetGradientToColor;
|
property GradientToColor: TColor read FGradientToColor write SetGradientToColor;
|
||||||
property GradientType: TBackgroundKind read FGradientType write SetGradientType;
|
property GradientType: TBackgroundKind read FGradientType write SetGradientType;
|
||||||
|
property HotTrackBrightnessChange: Integer read FHotTrackBrightnessChange write SetHotTrackBrightnessChange default 20;
|
||||||
property Style: TSpkPaneStyle read FStyle write SetStyle default psRectangleEtched;
|
property Style: TSpkPaneStyle read FStyle write SetStyle default psRectangleEtched;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
type TSpkElementAppearance = class(TPersistent)
|
TSpkElementAppearance = class(TPersistent)
|
||||||
private
|
private
|
||||||
FDispatch: TSpkBaseAppearanceDispatch;
|
FDispatch: TSpkBaseAppearanceDispatch;
|
||||||
FCaptionFont: TFont;
|
FCaptionFont: TFont;
|
||||||
@ -466,13 +469,14 @@ begin
|
|||||||
begin
|
begin
|
||||||
SrcAppearance := TSpkPaneAppearance(Source);
|
SrcAppearance := TSpkPaneAppearance(Source);
|
||||||
|
|
||||||
FCaptionFont.assign(SrcAppearance.CaptionFont);
|
FCaptionFont.Assign(SrcAppearance.CaptionFont);
|
||||||
FBorderDarkColor := SrcAppearance.BorderDarkColor;
|
FBorderDarkColor := SrcAppearance.BorderDarkColor;
|
||||||
FBorderLightColor := SrcAppearance.BorderLightColor;
|
FBorderLightColor := SrcAppearance.BorderLightColor;
|
||||||
FCaptionBgColor := SrcAppearance.CaptionBgColor;
|
FCaptionBgColor := SrcAppearance.CaptionBgColor;
|
||||||
FGradientFromColor := SrcAppearance.GradientFromColor;
|
FGradientFromColor := SrcAppearance.GradientFromColor;
|
||||||
FGradientToColor := SrcAppearance.GradientToColor;
|
FGradientToColor := SrcAppearance.GradientToColor;
|
||||||
FGradientType := SrcAppearance.GradientType;
|
FGradientType := SrcAppearance.GradientType;
|
||||||
|
FHotTrackBrightnessChange := SrcAppearance.HotTrackBrightnessChange;
|
||||||
FStyle := SrcAppearance.Style;
|
FStyle := SrcAppearance.Style;
|
||||||
|
|
||||||
if FDispatch <> nil then
|
if FDispatch <> nil then
|
||||||
@ -486,6 +490,7 @@ begin
|
|||||||
inherited Create;
|
inherited Create;
|
||||||
FDispatch := ADispatch;
|
FDispatch := ADispatch;
|
||||||
FCaptionFont := TFont.Create;
|
FCaptionFont := TFont.Create;
|
||||||
|
FHotTrackBrightnessChange := 20;
|
||||||
FStyle := psRectangleEtched;
|
FStyle := psRectangleEtched;
|
||||||
Reset;
|
Reset;
|
||||||
end;
|
end;
|
||||||
@ -528,9 +533,13 @@ begin
|
|||||||
FGradientToColor := Subnode.TextAsColor;
|
FGradientToColor := Subnode.TextAsColor;
|
||||||
|
|
||||||
Subnode := Node['GradientType', false];
|
Subnode := Node['GradientType', false];
|
||||||
if assigned(Subnode) then
|
if Assigned(Subnode) then
|
||||||
FGradientType := TBackgroundKind(Subnode.TextAsInteger);
|
FGradientType := TBackgroundKind(Subnode.TextAsInteger);
|
||||||
|
|
||||||
|
Subnode := Node['HotTrackBrightnessChange', false];
|
||||||
|
if Assigned(Subnode) then
|
||||||
|
FHotTrackBrightnessChange := Subnode.TextAsInteger;
|
||||||
|
|
||||||
Subnode := Node['Style', false];
|
Subnode := Node['Style', false];
|
||||||
if Assigned(Subnode) then
|
if Assigned(Subnode) then
|
||||||
FStyle := TSpkPaneStyle(SubNode.TextAsInteger);
|
FStyle := TSpkPaneStyle(SubNode.TextAsInteger);
|
||||||
@ -551,6 +560,7 @@ begin
|
|||||||
FGradientFromColor := rgb(222, 232, 245);
|
FGradientFromColor := rgb(222, 232, 245);
|
||||||
FGradientToColor := rgb(199, 216, 237);
|
FGradientToColor := rgb(199, 216, 237);
|
||||||
FGradientType := bkConcave;
|
FGradientType := bkConcave;
|
||||||
|
FHotTrackBrightnessChange := 20;
|
||||||
FStyle := psRectangleEtched;
|
FStyle := psRectangleEtched;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -564,6 +574,7 @@ begin
|
|||||||
FGradientFromColor := $00F8F8F8;
|
FGradientFromColor := $00F8F8F8;
|
||||||
FGradientToColor := $00E9E9E9;
|
FGradientToColor := $00E9E9E9;
|
||||||
FGradientType := bkConcave;
|
FGradientType := bkConcave;
|
||||||
|
FHotTrackBrightnessChange := 20;
|
||||||
FStyle := psRectangleEtched;
|
FStyle := psRectangleEtched;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -577,6 +588,7 @@ begin
|
|||||||
FGradientFromColor := $00F1F1F1;
|
FGradientFromColor := $00F1F1F1;
|
||||||
FGradientToColor := $00F1F1F1;
|
FGradientToColor := $00F1F1F1;
|
||||||
FGradientType := bkSolid;
|
FGradientType := bkSolid;
|
||||||
|
FHotTrackBrightnessChange := 0;
|
||||||
FStyle := psDividerFlat;
|
FStyle := psDividerFlat;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -590,6 +602,7 @@ begin
|
|||||||
FGradientFromColor := $00464646;
|
FGradientFromColor := $00464646;
|
||||||
FGradientToColor := $00F1F1F1;
|
FGradientToColor := $00F1F1F1;
|
||||||
FGradientType := bkSolid;
|
FGradientType := bkSolid;
|
||||||
|
FHotTrackBrightnessChange := 0;
|
||||||
FStyle := psDividerFlat;
|
FStyle := psDividerFlat;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -606,6 +619,7 @@ begin
|
|||||||
Add(' GradientFromColor := $' + IntToHex(FGradientFromColor, 8) + ';');
|
Add(' GradientFromColor := $' + IntToHex(FGradientFromColor, 8) + ';');
|
||||||
Add(' GradientToColor := $' + IntToHex(FGradientToColor, 8) + ';');
|
Add(' GradientToColor := $' + IntToHex(FGradientToColor, 8) + ';');
|
||||||
Add(' GradientType := ' + GetEnumName(TypeInfo(TBackgroundKind), ord(FGradientType)) + ';');
|
Add(' GradientType := ' + GetEnumName(TypeInfo(TBackgroundKind), ord(FGradientType)) + ';');
|
||||||
|
Add(' HotTrackBrightnessChange = ' + IntToStr(FHotTrackBrightnessChange) + ';');
|
||||||
Add(' Style := ' + GetEnumName(TypeInfo(TSpkPaneStyle), ord(FStyle)) +';');
|
Add(' Style := ' + GetEnumName(TypeInfo(TSpkPaneStyle), ord(FStyle)) +';');
|
||||||
Add(' end;');
|
Add(' end;');
|
||||||
end;
|
end;
|
||||||
@ -639,6 +653,9 @@ begin
|
|||||||
Subnode := Node['GradientType',true];
|
Subnode := Node['GradientType',true];
|
||||||
Subnode.TextAsInteger := integer(FGradientType);
|
Subnode.TextAsInteger := integer(FGradientType);
|
||||||
|
|
||||||
|
Subnode := Node['HotTrackBrightnessChange',true];
|
||||||
|
Subnode.TextAsInteger := FHotTrackBrightnessChange;
|
||||||
|
|
||||||
Subnode := Node['Style', true];
|
Subnode := Node['Style', true];
|
||||||
Subnode.TextAsInteger := integer(FStyle);
|
Subnode.TextAsInteger := integer(FStyle);
|
||||||
end;
|
end;
|
||||||
@ -646,7 +663,7 @@ end;
|
|||||||
procedure TSpkPaneAppearance.SetBorderDarkColor(const Value: TColor);
|
procedure TSpkPaneAppearance.SetBorderDarkColor(const Value: TColor);
|
||||||
begin
|
begin
|
||||||
FBorderDarkColor := Value;
|
FBorderDarkColor := Value;
|
||||||
if assigned(FDispatch) then
|
if Assigned(FDispatch) then
|
||||||
FDispatch.NotifyAppearanceChanged;
|
FDispatch.NotifyAppearanceChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -664,6 +681,13 @@ begin
|
|||||||
FDispatch.NotifyAppearanceChanged;
|
FDispatch.NotifyAppearanceChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSpkPaneAppearance.SetCaptionFont(const Value: TFont);
|
||||||
|
begin
|
||||||
|
FCaptionFont.Assign(Value);
|
||||||
|
if FDispatch <> nil then
|
||||||
|
FDispatch.NotifyAppearanceChanged;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSpkPaneAppearance.SetGradientFromColor(const Value: TColor);
|
procedure TSpkPaneAppearance.SetGradientFromColor(const Value: TColor);
|
||||||
begin
|
begin
|
||||||
FGradientFromColor := Value;
|
FGradientFromColor := Value;
|
||||||
@ -685,9 +709,9 @@ begin
|
|||||||
FDispatch.NotifyAppearanceChanged;
|
FDispatch.NotifyAppearanceChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSpkPaneAppearance.SetCaptionFont(const Value: TFont);
|
procedure TSpkPaneAppearance.SetHotTrackBrightnessChange(const Value: Integer);
|
||||||
begin
|
begin
|
||||||
FCaptionFont.assign(Value);
|
FHotTrackBrightnessChange := Value;
|
||||||
if FDispatch <> nil then
|
if FDispatch <> nil then
|
||||||
FDispatch.NotifyAppearanceChanged;
|
FDispatch.NotifyAppearanceChanged;
|
||||||
end;
|
end;
|
||||||
|
@ -231,6 +231,7 @@ var
|
|||||||
FontColor, BorderLightColor, BorderDarkColor, c: TColor;
|
FontColor, BorderLightColor, BorderDarkColor, c: TColor;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
R: T2DIntRect;
|
R: T2DIntRect;
|
||||||
|
delta: Integer;
|
||||||
begin
|
begin
|
||||||
// W niektórych warunkach nie jesteœmy w stanie rysowaæ:
|
// W niektórych warunkach nie jesteœmy w stanie rysowaæ:
|
||||||
// * Brak dyspozytora
|
// * Brak dyspozytora
|
||||||
@ -252,12 +253,13 @@ begin
|
|||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
// psHover
|
// psHover
|
||||||
BgFromColor:=TColorTools.Brighten(FAppearance.Pane.GradientFromColor,20);
|
delta := FAppearance.Pane.HotTrackBrightnessChange;
|
||||||
BgToColor:=TColorTools.Brighten(FAppearance.Pane.GradientToColor,20);
|
BgFromColor := TColorTools.Brighten(FAppearance.Pane.GradientFromColor, delta);
|
||||||
CaptionColor:=TColorTools.Brighten(FAppearance.Pane.CaptionBgColor,20);
|
BgToColor := TColorTools.Brighten(FAppearance.Pane.GradientToColor, delta);
|
||||||
FontColor:=TColorTools.Brighten(FAppearance.Pane.CaptionFont.Color,20);
|
CaptionColor := TColorTools.Brighten(FAppearance.Pane.CaptionBgColor, delta);
|
||||||
BorderLightColor:=TColorTools.Brighten(FAppearance.Pane.BorderLightColor,20);
|
FontColor := TColorTools.Brighten(FAppearance.Pane.CaptionFont.Color, delta);
|
||||||
BorderDarkColor:=TColorTools.Brighten(FAppearance.Pane.BorderDarkColor,20);
|
BorderLightColor := TColorTools.Brighten(FAppearance.Pane.BorderLightColor, delta);
|
||||||
|
BorderDarkColor := TColorTools.Brighten(FAppearance.Pane.BorderDarkColor, delta);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// T³o
|
// T³o
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
||||||
Left = 617
|
Left = 554
|
||||||
Height = 544
|
Height = 568
|
||||||
Top = 138
|
Top = 248
|
||||||
Width = 558
|
Width = 558
|
||||||
Caption = 'Toolbar appearance editor'
|
Caption = 'Toolbar appearance editor'
|
||||||
ClientHeight = 544
|
ClientHeight = 568
|
||||||
ClientWidth = 558
|
ClientWidth = 558
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -321,12 +321,12 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
end
|
end
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 371
|
Height = 395
|
||||||
Top = 132
|
Top = 132
|
||||||
Width = 558
|
Width = 558
|
||||||
ActivePage = TabSheet5
|
ActivePage = TabSheet2
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 4
|
TabIndex = 1
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Tab'
|
Caption = 'Tab'
|
||||||
@ -697,7 +697,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
end
|
end
|
||||||
object TabSheet2: TTabSheet
|
object TabSheet2: TTabSheet
|
||||||
Caption = 'Pane'
|
Caption = 'Pane'
|
||||||
ClientHeight = 343
|
ClientHeight = 367
|
||||||
ClientWidth = 550
|
ClientWidth = 550
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object Label8: TLabel
|
object Label8: TLabel
|
||||||
@ -784,7 +784,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 27
|
Left = 27
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 266
|
Top = 295
|
||||||
Width = 94
|
Width = 94
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Pane caption font'
|
Caption = 'Pane caption font'
|
||||||
@ -928,7 +928,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 141
|
Left = 141
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 261
|
Top = 290
|
||||||
Width = 127
|
Width = 127
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -940,13 +940,13 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
end
|
end
|
||||||
object pPaneCaptionFontColor: TPanel
|
object pPaneCaptionFontColor: TPanel
|
||||||
AnchorSideLeft.Control = pPaneCaptionBackground
|
AnchorSideLeft.Control = pPaneCaptionBackground
|
||||||
AnchorSideTop.Control = pPaneCaptionBackground
|
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = pPaneCaptionBackground
|
AnchorSideRight.Control = pPaneCaptionBackground
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 141
|
Left = 141
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 230
|
Top = 259
|
||||||
Width = 100
|
Width = 100
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -978,7 +978,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 141
|
Left = 141
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 292
|
Top = 321
|
||||||
Width = 127
|
Width = 127
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -1004,7 +1004,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 68
|
Left = 68
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 296
|
Top = 325
|
||||||
Width = 53
|
Width = 53
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Pane style'
|
Caption = 'Pane style'
|
||||||
@ -1087,7 +1087,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 49
|
Left = 49
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 235
|
Top = 264
|
||||||
Width = 72
|
Width = 72
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Left = 12
|
BorderSpacing.Left = 12
|
||||||
@ -1120,7 +1120,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 243
|
Left = 243
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 230
|
Top = 259
|
||||||
Width = 25
|
Width = 25
|
||||||
AllowAllUp = True
|
AllowAllUp = True
|
||||||
BorderSpacing.Left = 2
|
BorderSpacing.Left = 2
|
||||||
@ -1137,10 +1137,54 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
Width = 8
|
Width = 8
|
||||||
Shape = bsSpacer
|
Shape = bsSpacer
|
||||||
end
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = LblPaneCaptionBackground
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 16
|
||||||
|
Height = 30
|
||||||
|
Top = 226
|
||||||
|
Width = 105
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
Caption = 'HotTrack brightness'#13#10'change'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object ePaneHotTrackBrightnessChange: TSpinEdit
|
||||||
|
AnchorSideLeft.Control = pPaneCaptionBackground
|
||||||
|
AnchorSideTop.Control = pPaneCaptionBackground
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = pPaneCaptionBackground
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 141
|
||||||
|
Height = 23
|
||||||
|
Top = 230
|
||||||
|
Width = 100
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
MinValue = -100
|
||||||
|
OnChange = ePaneHotTrackBrightnessChangeChange
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
AnchorSideLeft.Control = ePaneHotTrackBrightnessChange
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = ePaneHotTrackBrightnessChange
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 247
|
||||||
|
Height = 15
|
||||||
|
Top = 234
|
||||||
|
Width = 10
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
Caption = '%'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object TabSheet3: TTabSheet
|
object TabSheet3: TTabSheet
|
||||||
Caption = 'Item'
|
Caption = 'Item'
|
||||||
ClientHeight = 343
|
ClientHeight = 367
|
||||||
ClientWidth = 550
|
ClientWidth = 550
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
object sItemRectangle: TShape
|
object sItemRectangle: TShape
|
||||||
@ -2261,7 +2305,7 @@ object frmAppearanceEditWindow: TfrmAppearanceEditWindow
|
|||||||
object ButtonPanel: TPanel
|
object ButtonPanel: TPanel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 511
|
Top = 535
|
||||||
Width = 542
|
Width = 542
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, ExtCtrls, StdCtrls, ComCtrls, Buttons,
|
Dialogs, ExtCtrls, StdCtrls, ComCtrls, Buttons, Spin,
|
||||||
SpkGUITools, SpkXMLParser,
|
SpkGUITools, SpkXMLParser,
|
||||||
spkt_Buttons, spkt_BaseItem, spkt_Pane, spkt_Types, spkt_Tab, SpkToolbar,
|
spkt_Buttons, spkt_BaseItem, spkt_Pane, spkt_Types, spkt_Tab, SpkToolbar,
|
||||||
spkt_Appearance;
|
spkt_Appearance;
|
||||||
@ -17,8 +17,11 @@ type
|
|||||||
|
|
||||||
TfrmAppearanceEditWindow = class(TForm)
|
TfrmAppearanceEditWindow = class(TForm)
|
||||||
CbAppearanceStyle: TComboBox;
|
CbAppearanceStyle: TComboBox;
|
||||||
|
Label15: TLabel;
|
||||||
|
Label16: TLabel;
|
||||||
PaneHSpacer: TBevel;
|
PaneHSpacer: TBevel;
|
||||||
ItemHSpacer: TBevel;
|
ItemHSpacer: TBevel;
|
||||||
|
ePaneHotTrackBrightnessChange: TSpinEdit;
|
||||||
TabVSpacer: TBevel;
|
TabVSpacer: TBevel;
|
||||||
bInactiveTabHeaderFontColor: TSpeedButton;
|
bInactiveTabHeaderFontColor: TSpeedButton;
|
||||||
bItemActiveInnerDarkColor: TSpeedButton;
|
bItemActiveInnerDarkColor: TSpeedButton;
|
||||||
@ -211,7 +214,7 @@ type
|
|||||||
procedure cbLinkItemClick(Sender: TObject);
|
procedure cbLinkItemClick(Sender: TObject);
|
||||||
procedure cbLinkPaneClick(Sender: TObject);
|
procedure cbLinkPaneClick(Sender: TObject);
|
||||||
procedure cbLinkTabClick(Sender: TObject);
|
procedure cbLinkTabClick(Sender: TObject);
|
||||||
|
procedure ePaneHotTrackBrightnessChangeChange(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
@ -805,6 +808,14 @@ begin
|
|||||||
Result := false;
|
Result := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmAppearanceEditWindow.ePaneHotTrackBrightnessChangeChange(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
with tbPreview.Appearance.Pane do
|
||||||
|
HotTrackBrightnessChange := (Sender as TSpinEdit).Value;
|
||||||
|
tbPreview.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmAppearanceEditWindow.FormActivate(Sender: TObject);
|
procedure TfrmAppearanceEditWindow.FormActivate(Sender: TObject);
|
||||||
var
|
var
|
||||||
w, h: Integer;
|
w, h: Integer;
|
||||||
|
Reference in New Issue
Block a user