|
|
|
@ -28,6 +28,8 @@ type
|
|
|
|
|
|
|
|
|
|
TSpkElementStyle = (esRounded, esRectangle);
|
|
|
|
|
|
|
|
|
|
TSpkPopupStyle = (psDefault, psGutter);
|
|
|
|
|
|
|
|
|
|
TSpkMenuButtonShapeStyle = (mbssRounded, mbssRectangle);
|
|
|
|
|
|
|
|
|
|
TSpkStyle = (
|
|
|
|
@ -336,6 +338,70 @@ type
|
|
|
|
|
property Style: TSpkElementStyle read FStyle write SetStyle;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
TSpkPopupMenuAppearance = class(TPersistent)
|
|
|
|
|
private
|
|
|
|
|
FDispatch: TSpkBaseAppearanceDispatch;
|
|
|
|
|
FCaptionFont: TFont;
|
|
|
|
|
FDisabledCaptionColor : TColor;
|
|
|
|
|
FGutterGradientFromColor: TColor;
|
|
|
|
|
FGutterGradientToColor: TColor;
|
|
|
|
|
FGutterGradientType: TBackgroundKind;
|
|
|
|
|
FGutterLineColor: TColor;
|
|
|
|
|
FHotTrackCaptionColor: TColor;
|
|
|
|
|
FHotTrackFrameColor: TColor;
|
|
|
|
|
FHotTrackGradientFromColor: TColor;
|
|
|
|
|
FHotTrackGradientToColor: TColor;
|
|
|
|
|
FHotTrackGradientType: TBackgroundKind;
|
|
|
|
|
FIdleCaptionColor: TColor;
|
|
|
|
|
FIdleGradientFromColor: TColor;
|
|
|
|
|
FIdleGradientToColor: TColor;
|
|
|
|
|
FIdleGradientType: TBackgroundKind;
|
|
|
|
|
FStyle: TSpkPopupStyle;
|
|
|
|
|
procedure SetCaptionFont(const Value: TFont);
|
|
|
|
|
procedure SetDisabledCaptionColor(const Value: TColor);
|
|
|
|
|
procedure SetGutterGradientFromColor(const Value: TColor);
|
|
|
|
|
procedure SetGutterGradientToColor(const Value: TColor);
|
|
|
|
|
procedure SetGutterGradientType(const Value: TBackgroundKind);
|
|
|
|
|
procedure SetGutterLineColor(const Value: TColor);
|
|
|
|
|
procedure SetHotTrackCaptionColor(const Value: TColor);
|
|
|
|
|
procedure SetHotTrackFrameColor(const Value: TColor);
|
|
|
|
|
procedure SetHotTrackGradientFromColor(const Value: TColor);
|
|
|
|
|
procedure SetHotTrackGradientToColor(const Value: TColor);
|
|
|
|
|
procedure SetHotTrackGradientType(const Value: TBackgroundKind);
|
|
|
|
|
procedure SetIdleCaptionColor(const Value: TColor);
|
|
|
|
|
procedure SetIdleGradientFromColor(const Value: TColor);
|
|
|
|
|
procedure SetIdleGradientToColor(const Value: TColor);
|
|
|
|
|
procedure SetIdleGradientType(const Value: TBackgroundKind);
|
|
|
|
|
procedure SetStyle(const Value: TSpkPopupStyle);
|
|
|
|
|
protected
|
|
|
|
|
procedure CaptionFontChange(Sender: TObject);
|
|
|
|
|
public
|
|
|
|
|
constructor Create(ADispatch: TSpkBaseAppearanceDispatch);
|
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
procedure Assign(Source: TPersistent); override;
|
|
|
|
|
procedure LoadFromXML(Node: TSpkXMLNode);
|
|
|
|
|
procedure SaveToPascal(AList: TStrings);
|
|
|
|
|
procedure SaveToXML(Node: TSpkXMLNode);
|
|
|
|
|
procedure Reset(AStyle: TSpkStyle = spkOffice2007Blue);
|
|
|
|
|
published
|
|
|
|
|
property CaptionFont: TFont read FCaptionFont write SetCaptionFont;
|
|
|
|
|
property DisabledCaptionColor: TColor read FDisabledCaptionColor write SetDisabledCaptionColor;
|
|
|
|
|
property GutterGradientFromColor: TColor read FGutterGradientFromColor write SetGutterGradientFromColor;
|
|
|
|
|
property GutterGradientToColor: TColor read FGutterGradientToColor write SetGutterGradientToColor;
|
|
|
|
|
property GutterGradientType: TBackgroundKind read FGutterGradientType write SetGutterGradientType;
|
|
|
|
|
property GutterLineColor: TColor read FGutterLineColor write SetGutterLineColor;
|
|
|
|
|
property HotTrackCaptionColor: TColor read FHotTrackCaptionColor write SetHotTrackCaptionColor;
|
|
|
|
|
property HotTrackFrameColor: TColor read FHotTrackFrameColor write SetHotTrackFrameColor;
|
|
|
|
|
property HotTrackGradientFromColor: TColor read FHotTrackGradientFromColor write SetHotTrackGradientFromColor;
|
|
|
|
|
property HotTrackGradientToColor: TColor read FHotTrackGradientToColor write SetHotTrackGradientToColor;
|
|
|
|
|
property HotTrackGradientType: TBackgroundKind read FHotTrackGradientType write SetHotTrackGradientType;
|
|
|
|
|
property IdleCaptionColor: TColor read FIdleCaptionColor write SetIdleCaptionColor;
|
|
|
|
|
property IdleGradientFromColor: TColor read FIdleGradientFromColor write SetIdleGradientFromColor;
|
|
|
|
|
property IdleGradientToColor: TColor read FIdleGradientToColor write SetIdleGradientToColor;
|
|
|
|
|
property IdleGradientType: TBackgroundKind read FHotTrackGradientType write SetHotTrackGradientType;
|
|
|
|
|
property Style: TSpkPopupStyle read FStyle write SetStyle;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ TSpkToolbarAppearance }
|
|
|
|
|
|
|
|
|
@ -356,10 +422,12 @@ type
|
|
|
|
|
FMenuButton: TSpkMenuButtonAppearance;
|
|
|
|
|
FPane: TSpkPaneAppearance;
|
|
|
|
|
FElement: TSpkElementAppearance;
|
|
|
|
|
FPopup: TSpkPopupMenuAppearance;
|
|
|
|
|
FDispatch: TSpkBaseAppearanceDispatch;
|
|
|
|
|
procedure SetElementAppearance(const Value: TSpkElementAppearance);
|
|
|
|
|
procedure SetPaneAppearance(const Value: TSpkPaneAppearance);
|
|
|
|
|
procedure SetTabAppearance(const Value: TSpkTabAppearance);
|
|
|
|
|
procedure SetPopupAppearance(const Value: TSpkPopupMenuAppearance);
|
|
|
|
|
procedure SetMenuButtonAppearance(const Value: TSpkMenuButtonAppearance);
|
|
|
|
|
public
|
|
|
|
|
constructor Create(ADispatch: TSpkBaseAppearanceDispatch); reintroduce;
|
|
|
|
@ -375,6 +443,7 @@ type
|
|
|
|
|
property MenuButton: TSpkMenuButtonAppearance read FMenuButton write SetMenuButtonAppearance;
|
|
|
|
|
property Pane: TSpkPaneAppearance read FPane write SetPaneAppearance;
|
|
|
|
|
property Element: TSpkElementAppearance read FElement write SetElementAppearance;
|
|
|
|
|
property Popup: TSpkPopupMenuAppearance read FPopup write SetPopupAppearance;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure SetDefaultFont({%H-}AFont: TFont);
|
|
|
|
@ -1658,6 +1727,555 @@ begin
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ TSpkPopupMenuAppearance }
|
|
|
|
|
|
|
|
|
|
constructor TSpkPopupMenuAppearance.Create(ADispatch: TSpkBaseAppearanceDispatch);
|
|
|
|
|
begin
|
|
|
|
|
inherited Create;
|
|
|
|
|
FDispatch := ADispatch;
|
|
|
|
|
FCaptionFont := TFont.Create;
|
|
|
|
|
FCaptionFont.OnChange := CaptionFontChange;
|
|
|
|
|
Reset;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TSpkPopupMenuAppearance.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Free;
|
|
|
|
|
inherited Destroy;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.Assign(Source: TPersistent);
|
|
|
|
|
var
|
|
|
|
|
SrcAppearance: TSpkPopupMenuAppearance;
|
|
|
|
|
begin
|
|
|
|
|
if Source is TSpkPopupMenuAppearance then
|
|
|
|
|
begin
|
|
|
|
|
SrcAppearance := TSpkPopupMenuAppearance(Source);
|
|
|
|
|
|
|
|
|
|
FCaptionFont.Assign(SrcAppearance.CaptionFont);
|
|
|
|
|
FDisabledCaptionColor := SrcAppearance.DisabledCaptionColor;
|
|
|
|
|
{
|
|
|
|
|
FIdleFrameColor := SrcAppearance.IdleFrameColor;
|
|
|
|
|
}
|
|
|
|
|
FIdleCaptionColor := SrcAppearance.IdleCaptionColor;
|
|
|
|
|
FIdleGradientFromColor := SrcAppearance.IdleGradientFromColor;
|
|
|
|
|
FIdleGradientToColor := SrcAppearance.IdleGradientToColor;
|
|
|
|
|
FIdleGradientType := SrcAppearance.IdleGradientType;
|
|
|
|
|
{
|
|
|
|
|
FIdleInnerLightColor := SrcAppearance.IdleInnerLightColor;
|
|
|
|
|
FIdleInnerDarkColor := SrcAppearance.IdleInnerDarkColor;
|
|
|
|
|
}
|
|
|
|
|
FHotTrackCaptionColor := SrcAppearance.HotTrackCaptionColor;
|
|
|
|
|
FHotTrackFrameColor := SrcAppearance.HotTrackFrameColor;
|
|
|
|
|
FHotTrackGradientFromColor := SrcAppearance.HotTrackGradientFromColor;
|
|
|
|
|
FHotTrackGradientToColor := SrcAppearance.HotTrackGradientToColor;
|
|
|
|
|
FHotTrackGradientType := SrcAppearance.HotTrackGradientType;
|
|
|
|
|
{
|
|
|
|
|
FHotTrackInnerLightColor := SrcAppearance.HotTrackInnerLightColor;
|
|
|
|
|
FHotTrackInnerDarkColor := SrcAppearance.HotTrackInnerDarkColor;
|
|
|
|
|
FHotTrackBrightnessChange := SrcAppearance.HotTrackBrightnessChange;
|
|
|
|
|
FActiveFrameColor := SrcAppearance.ActiveFrameColor;
|
|
|
|
|
FActiveGradientFromColor := SrcAppearance.ActiveGradientFromColor;
|
|
|
|
|
FActiveGradientToColor := SrcAppearance.ActiveGradientToColor;
|
|
|
|
|
FActiveGradientType := SrcAppearance.ActiveGradientType;
|
|
|
|
|
FActiveInnerLightColor := SrcAppearance.ActiveInnerLightColor;
|
|
|
|
|
FActiveInnerDarkColor := SrcAppearance.ActiveInnerDarkColor;
|
|
|
|
|
FActiveCaptionColor := SrcAppearance.ActiveCaptionColor;
|
|
|
|
|
}
|
|
|
|
|
FStyle := SrcAppearance.Style;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end else
|
|
|
|
|
raise AssignException.Create('TSpkPopupMenuAppearance.Assign: Cannot assign the objecct '+Source.ClassName+' to TSpkPopuMenuAppearance!');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.CaptionFontChange(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.LoadFromXML(Node: TSpkXMLNode);
|
|
|
|
|
var
|
|
|
|
|
Subnode: TSpkXMLNode;
|
|
|
|
|
begin
|
|
|
|
|
if not Assigned(Node) then
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['CaptionFont', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
TSpkXMLTools.Load(Subnode, FCaptionFont);
|
|
|
|
|
|
|
|
|
|
// Disabled text
|
|
|
|
|
Subnode := Node['DisabledCaptionColor', false];
|
|
|
|
|
if Assigned(SubNode) then
|
|
|
|
|
FDisabledCaptionColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
// Idle
|
|
|
|
|
Subnode := Node['IdleCaptionColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleCaptionColor := Subnode.TextAsColor;
|
|
|
|
|
{
|
|
|
|
|
Subnode := Node['IdleFrameColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleFrameColor := Subnode.TextAsColor;
|
|
|
|
|
}
|
|
|
|
|
Subnode := Node['IdleGradientFromColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleGradientFromColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleGradientToColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleGradientToColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleGradientType', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleGradientType := TBackgroundKind(Subnode.TextAsInteger);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Subnode := Node['IdleInnerLightColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleInnerLightColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleInnerDarkColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FIdleInnerDarkColor := Subnode.TextAsColor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Gutter
|
|
|
|
|
Subnode := Node['GutterGradientFromColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FGutterGradientFromColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GutterGradientToColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FGutterGradientToColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GuttereGradientType', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FGutterGradientType := TBackgroundKind(Subnode.TextAsInteger);
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GutterLineColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FGutterLineColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// HotTrack
|
|
|
|
|
Subnode := Node['HottrackCaptionColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackCaptionColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackFrameColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackFrameColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientFromColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackGradientFromColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientToColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackGradientToColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientType', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackGradientType := TBackgroundKind(Subnode.TextAsInteger);
|
|
|
|
|
{
|
|
|
|
|
Subnode := Node['HottrackInnerLightColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackInnerLightColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackInnerDarkColor', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackInnerDarkColor := Subnode.TextAsColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackBrightnessChange', false];
|
|
|
|
|
if Assigned(Subnode) then
|
|
|
|
|
FHottrackBrightnessChange := Subnode.TextAsInteger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Other
|
|
|
|
|
Subnode := Node['Style', false];
|
|
|
|
|
if Assigned(SubNode) then
|
|
|
|
|
FStyle := TSpkPopupStyle(Subnode.TextAsInteger);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.Reset(AStyle: TSpkStyle = spkOffice2007Blue);
|
|
|
|
|
begin
|
|
|
|
|
SetDefaultFont(FCaptionFont);
|
|
|
|
|
case AStyle of
|
|
|
|
|
spkOffice2007Blue:
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Style := [];
|
|
|
|
|
FDisabledCaptionColor := rgb(192, 192, 192);
|
|
|
|
|
{
|
|
|
|
|
FIdleFrameColor := rgb(155, 183, 224);
|
|
|
|
|
}
|
|
|
|
|
FGutterGradientFromColor := rgb(233, 238, 238);
|
|
|
|
|
FGutterGradientToColor := rgb(233, 238, 238);
|
|
|
|
|
FGutterGradientType := bkSolid;
|
|
|
|
|
FGutterLineColor := rgb(197, 197, 197);
|
|
|
|
|
{
|
|
|
|
|
FIdleInnerLightColor := rgb(213, 227, 241);
|
|
|
|
|
FIdleInnerDarkColor := rgb(190, 211, 236);
|
|
|
|
|
}
|
|
|
|
|
FHotTrackCaptionColor := rgb(111, 66, 135);
|
|
|
|
|
FHotTrackFrameColor := rgb(219, 206, 153);
|
|
|
|
|
FHotTrackGradientFromColor := rgb(255, 252, 218);
|
|
|
|
|
FHotTrackGradientToColor := rgb(255, 215, 77);
|
|
|
|
|
FHotTrackGradientType := bkConcave;
|
|
|
|
|
{
|
|
|
|
|
FHotTrackInnerLightColor := rgb(255, 241, 197);
|
|
|
|
|
FHotTrackInnerDarkColor := rgb(216, 194, 122);
|
|
|
|
|
FHotTrackBrightnessChange := 40;
|
|
|
|
|
}
|
|
|
|
|
FIdleCaptionColor := rgb(86, 125, 177);
|
|
|
|
|
FIdleGradientFromColor := rgb(250, 250, 250);
|
|
|
|
|
FIdleGradientToColor := rgb(250, 250, 250);
|
|
|
|
|
FIdleGradientType := bkSolid;
|
|
|
|
|
FStyle := psGutter;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
spkOffice2007Silver,
|
|
|
|
|
spkOffice2007SilverTurquoise:
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Style := [];
|
|
|
|
|
FCaptionFont.Color := $008B4215;
|
|
|
|
|
FDisabledCaptionColor := rgb(192, 192, 192);
|
|
|
|
|
{
|
|
|
|
|
FIdleFrameColor := $00B8B1A9;
|
|
|
|
|
}
|
|
|
|
|
FIdleCaptionColor := $0060655F;
|
|
|
|
|
FIdleGradientFromColor := rgb(250, 250, 250);
|
|
|
|
|
FIdleGradientToColor := rgb(250, 250, 250);
|
|
|
|
|
FIdleGradientType := bkSolid;
|
|
|
|
|
FGutterGradientFromColor := rgb(239, 239, 239);
|
|
|
|
|
FGutterGradientToColor := rgb(239, 239, 239);
|
|
|
|
|
FGutterGradientType := bkSolid;
|
|
|
|
|
FGutterLineColor := rgb(197, 197, 197);
|
|
|
|
|
{
|
|
|
|
|
FIdleInnerDarkColor := $00C7C0BA;
|
|
|
|
|
FIdleInnerLightColor := $00F6F2F0;
|
|
|
|
|
FHotTrackBrightnessChange := 40;
|
|
|
|
|
}
|
|
|
|
|
FHotTrackCaptionColor := $0087426F;
|
|
|
|
|
FHotTrackGradientType := bkConcave;
|
|
|
|
|
{
|
|
|
|
|
FHotTrackInnerDarkColor := $007AC2D8;
|
|
|
|
|
FHotTrackInnerLightColor := $00C5F1FF;
|
|
|
|
|
}
|
|
|
|
|
if AStyle = spkOffice2007SilverTurquoise then
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackFrameColor := $009E7D0E;
|
|
|
|
|
FHotTrackGradientFromColor := $00FBF1D0;
|
|
|
|
|
FHotTrackGradientToColor := $00F4DD8A;
|
|
|
|
|
// FHotTrackInnerDarkColor := $00C19A11;
|
|
|
|
|
// FHotTrackInnerLightColor := $00FAEFC9;
|
|
|
|
|
end else
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackFrameColor := rgb(219, 206, 153); //$009BCFDD;
|
|
|
|
|
FHotTrackGradientFromColor := $00DAFCFF;
|
|
|
|
|
FHotTrackGradientToColor := $004DD7FF;
|
|
|
|
|
end;
|
|
|
|
|
FStyle := psGutter;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
spkMetroLight:
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Style := [];
|
|
|
|
|
FCaptionFont.Color := $003F3F3F;
|
|
|
|
|
FDisabledCaptionColor := rgb(192, 192, 192);
|
|
|
|
|
FGutterGradientFromColor := rgb(239, 239, 239);
|
|
|
|
|
FGutterGradientToColor := rgb(239, 239, 239);
|
|
|
|
|
FGutterGradientType := bkSolid;
|
|
|
|
|
FGutterLineColor := rgb(197, 197, 197);
|
|
|
|
|
FHotTrackCaptionColor := $003F3F3F;
|
|
|
|
|
FHotTrackFrameColor := $00F9CEA4;
|
|
|
|
|
FHotTrackGradientFromColor := $00F7EFE8;
|
|
|
|
|
FHotTrackGradientToColor := $00F7EFE8;
|
|
|
|
|
FHotTrackGradientType := bkSolid;
|
|
|
|
|
{
|
|
|
|
|
FHotTrackInnerDarkColor := $00F7EFE8;
|
|
|
|
|
FHotTrackInnerLightColor := $00F7EFE8;
|
|
|
|
|
FHotTrackBrightnessChange := 20;
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
FIdleFrameColor := $00CDCDCD;
|
|
|
|
|
}
|
|
|
|
|
FIdleCaptionColor := $00696969;
|
|
|
|
|
FIdleGradientFromColor := $00F1F1F1;
|
|
|
|
|
FIdleGradientToColor := $00F1F1F1;
|
|
|
|
|
FIdleGradientType := bkSolid;
|
|
|
|
|
{
|
|
|
|
|
FIdleInnerDarkColor := $00CDCDCD;
|
|
|
|
|
FIdleInnerLightColor := $00EBEBEB;
|
|
|
|
|
FHotTrackInnerDarkColor := $00F7EFE8;
|
|
|
|
|
FHotTrackInnerLightColor := $00F7EFE8;
|
|
|
|
|
FHotTrackBrightnessChange := 20;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FStyle := psDefault;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
spkMetroDark:
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Style := [];
|
|
|
|
|
FCaptionFont.Color := $003F3F3F;
|
|
|
|
|
FDisabledCaptionColor := $787878;
|
|
|
|
|
FGutterGradientFromColor := clBlack;
|
|
|
|
|
FGutterGradientToColor := clBlack;
|
|
|
|
|
FGutterGradientType := bkSolid;
|
|
|
|
|
FGutterLineColor := rgb(32, 32, 32);
|
|
|
|
|
FHotTrackCaptionColor := $00F2F2F2;
|
|
|
|
|
FHotTrackFrameColor := $00C4793C;
|
|
|
|
|
FHotTrackGradientFromColor := $00805B3D;
|
|
|
|
|
FHotTrackGradientToColor := $00805B3D;
|
|
|
|
|
FHotTrackGradientType := bkSolid;
|
|
|
|
|
{
|
|
|
|
|
FHotTrackInnerDarkColor := $00805B3D;
|
|
|
|
|
FHotTrackInnerLightColor := $00805B3D;
|
|
|
|
|
FHotTrackBrightnessChange := 10;
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
FIdleFrameColor := $008C8482;
|
|
|
|
|
}
|
|
|
|
|
FIdleCaptionColor := $00B6B6B6;
|
|
|
|
|
FIdleGradientFromColor := $00444444;
|
|
|
|
|
FIdleGradientToColor := $00444444;
|
|
|
|
|
FIdleGradientType := bkSolid;
|
|
|
|
|
{
|
|
|
|
|
FIdleInnerDarkColor := $008C8482;
|
|
|
|
|
FIdleInnerLightColor := $00444444;
|
|
|
|
|
}
|
|
|
|
|
FStyle := psDefault;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SaveToPascal(AList: TStrings);
|
|
|
|
|
begin
|
|
|
|
|
with AList do begin
|
|
|
|
|
Add(' with Popup do begin');
|
|
|
|
|
SaveFontToPascal(AList, FCaptionFont, ' CaptionFont');
|
|
|
|
|
|
|
|
|
|
Add(' IdleCaptionColor := $' + IntToHex(FIdleCaptionColor, 8) + ';');
|
|
|
|
|
// Add(' IdleFrameColor := $' + IntToHex(FIdleFrameColor, 8) + ';');
|
|
|
|
|
Add(' IdleGradientFromColor := $' + IntToHex(FIdleGradientFromColor, 8) + ';');
|
|
|
|
|
Add(' IdleGradientToColor := $' + IntToHex(FIdleGradientToColor, 8) + ';');
|
|
|
|
|
Add(' IdleGradientType := ' + GetEnumName(TypeInfo(TBackgroundKind), ord(FIdleGradientType)) + ';');
|
|
|
|
|
// Add(' IdleInnerDarkColor := $' + IntToHex(FIdleInnerDarkColor, 8) + ';');
|
|
|
|
|
// Add(' IdleInnerLightColor := $' + IntToHex(FIdleInnerLightColor, 8) + ';');
|
|
|
|
|
|
|
|
|
|
Add(' GutterGradientFromColor := $' + IntToHex(FGutterGradientFromColor, 8) + ';');
|
|
|
|
|
Add(' GutterGradientToColor := $' + IntToHex(FGutterGradientToColor, 8) + ';');
|
|
|
|
|
Add(' GutterGradientType := ' + GetEnumName(TypeInfo(TBackgroundKind), ord(FGutterGradientType)) + ';');
|
|
|
|
|
Add(' GutterLineColor := $' + IntToHex(FGutterLineColor, 8) + ';');
|
|
|
|
|
|
|
|
|
|
Add(' HotTrackCaptionColor := $' + IntToHex(FHotTrackCaptionColor, 8) + ';');
|
|
|
|
|
Add(' HotTrackFrameColor := $' + IntToHex(FHotTrackFrameColor, 8) + ';');
|
|
|
|
|
Add(' HotTrackGradientFromColor := $' + IntToHex(FHotTrackGradientFromColor, 8) + ';');
|
|
|
|
|
Add(' HotTrackGradientToColor := $' + IntToHex(FHotTrackGradientToColor, 8) + ';');
|
|
|
|
|
Add(' HotTrackGradientType := ' + GetEnumName(TypeInfo(TBackgroundKind), ord(FHotTrackGradientType)) + ';');
|
|
|
|
|
// Add(' HotTrackInnerDarkColor := $' + IntToHex(FHotTrackInnerDarkColor, 8) + ';');
|
|
|
|
|
// Add(' HotTrackInnerLightColor := $' + IntToHex(FHotTrackInnerLightColor, 8) + ';');
|
|
|
|
|
// Add(' HotTrackBrightnessChange := ' + IntToStr(FHotTrackBrightnessChange) + ';');
|
|
|
|
|
|
|
|
|
|
Add(' Style := ' + GetEnumName(TypeInfo(TSpkPopupStyle), ord(FStyle)) + ';');
|
|
|
|
|
Add(' end;');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SaveToXML(Node: TSpkXMLNode);
|
|
|
|
|
var
|
|
|
|
|
Subnode: TSpkXMLNode;
|
|
|
|
|
begin
|
|
|
|
|
if not Assigned(Node) then
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['CaptionFont', true];
|
|
|
|
|
TSpkXMLTools.Save(Subnode, FCaptionFont);
|
|
|
|
|
|
|
|
|
|
// Idle
|
|
|
|
|
Subnode := Node['IdleCaptionColor', true];
|
|
|
|
|
Subnode.TextAsColor := FIdleCaptionColor;
|
|
|
|
|
|
|
|
|
|
// Subnode := Node['IdleFrameColor', true];
|
|
|
|
|
// Subnode.TextAsColor := FIdleFrameColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleGradientFromColor', true];
|
|
|
|
|
Subnode.TextAsColor := FIdleGradientFromColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleGradientToColor', true];
|
|
|
|
|
Subnode.TextAsColor := FIdleGradientToColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleGradientType', true];
|
|
|
|
|
Subnode.TextAsInteger := integer(FIdleGradientType);
|
|
|
|
|
{
|
|
|
|
|
Subnode := Node['IdleInnerLightColor', true];
|
|
|
|
|
Subnode.TextAsColor := FIdleInnerLightColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['IdleInnerDarkColor', true];
|
|
|
|
|
Subnode.TextAsColor := FIdleInnerDarkColor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Gutter
|
|
|
|
|
Subnode := Node['ButterGradientFromColor', true];
|
|
|
|
|
Subnode.TextAsColor := FGutterGradientFromColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GutterGradientToColor', true];
|
|
|
|
|
Subnode.TextAsColor := FGutterGradientToColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GutterGradientType', true];
|
|
|
|
|
Subnode.TextAsInteger := integer(FGutterGradientType);
|
|
|
|
|
|
|
|
|
|
Subnode := Node['GutterLineColor', true];
|
|
|
|
|
Subnode.TextAsColor := FGutterLineColor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// HotTrack
|
|
|
|
|
Subnode := Node['HottrackCaptionColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackCaptionColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackFrameColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackFrameColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientFromColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackGradientFromColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientToColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackGradientToColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackGradientType', true];
|
|
|
|
|
Subnode.TextAsInteger := integer(FHottrackGradientType);
|
|
|
|
|
{
|
|
|
|
|
Subnode := Node['HottrackInnerLightColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackInnerLightColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackInnerDarkColor', true];
|
|
|
|
|
Subnode.TextAsColor := FHottrackInnerDarkColor;
|
|
|
|
|
|
|
|
|
|
Subnode := Node['HottrackBrightnessChange', true];
|
|
|
|
|
Subnode.TextAsInteger := FHotTrackBrightnessChange;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Other
|
|
|
|
|
Subnode := Node['Style', true];
|
|
|
|
|
Subnode.TextAsInteger := integer(FStyle);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetCaptionFont(const Value: TFont);
|
|
|
|
|
begin
|
|
|
|
|
FCaptionFont.Assign(Value);
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetDisabledCaptionColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FDisabledCaptionColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetGutterGradientFromColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FGutterGradientFromColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetGutterGradientToColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FGutterGradientToColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetGutterGradientType(const Value: TBackgroundKind);
|
|
|
|
|
begin
|
|
|
|
|
FGutterGradientType := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetGutterLineColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FGutterLineColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetHotTrackCaptionColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackCaptionColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetHotTrackFrameColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackFrameColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetHotTrackGradientFromColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackGradientFromColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetHotTrackGradientToColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackGradientToColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetHotTrackGradientType(const Value: TBackgroundKind);
|
|
|
|
|
begin
|
|
|
|
|
FHotTrackGradientType := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetIdleGradientFromColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FIdleGradientFromColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetIdleCaptionColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FIdleCaptionColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetIdleGradientToColor(const Value: TColor);
|
|
|
|
|
begin
|
|
|
|
|
FIdleGradientToColor := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetIdleGradientType(const Value: TBackgroundKind);
|
|
|
|
|
begin
|
|
|
|
|
FIdleGradientType := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkPopupMenuAppearance.SetStyle(const Value: TSpkPopupStyle);
|
|
|
|
|
begin
|
|
|
|
|
FStyle := Value;
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ TSpkToolbarAppearanceDispatch }
|
|
|
|
|
|
|
|
|
|
constructor TSpkToolbarAppearanceDispatch.Create(
|
|
|
|
@ -1685,10 +2303,12 @@ begin
|
|
|
|
|
FMenuButton := TSpkMenuButtonAppearance.Create(FAppearanceDispatch);
|
|
|
|
|
FPane := TSpkPaneAppearance.create(FAppearanceDispatch);
|
|
|
|
|
FElement := TSpkElementAppearance.create(FAppearanceDispatch);
|
|
|
|
|
FPopup := TSpkPopupMenuAppearance.Create(FAppearanceDispatch);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TSpkToolbarAppearance.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
FPopup.Free;
|
|
|
|
|
FElement.Free;
|
|
|
|
|
FPane.Free;
|
|
|
|
|
FMenuButton.Free;
|
|
|
|
@ -1709,6 +2329,7 @@ begin
|
|
|
|
|
self.FMenuButton.Assign(Src.MenuButton);
|
|
|
|
|
self.FPane.Assign(Src.Pane);
|
|
|
|
|
self.FElement.Assign(Src.Element);
|
|
|
|
|
self.FPopup.Assign(Src.Popup);
|
|
|
|
|
|
|
|
|
|
if FDispatch <> nil then
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
@ -1724,6 +2345,7 @@ begin
|
|
|
|
|
MenuButton.Reset;
|
|
|
|
|
Pane.Reset;
|
|
|
|
|
Element.Reset;
|
|
|
|
|
Popup.Reset;
|
|
|
|
|
|
|
|
|
|
if not Assigned(Node) then
|
|
|
|
|
exit;
|
|
|
|
@ -1757,6 +2379,7 @@ begin
|
|
|
|
|
FMenuButton.Reset(AStyle);
|
|
|
|
|
FPane.Reset(AStyle);
|
|
|
|
|
FElement.Reset(AStyle);
|
|
|
|
|
FPopup.Reset(AStyle);
|
|
|
|
|
if Assigned(FAppearanceDispatch) then
|
|
|
|
|
FAppearanceDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
@ -1799,6 +2422,11 @@ begin
|
|
|
|
|
FPane.Assign(Value);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkToolbarAppearance.SetPopupAppearance(const Value: TSpkPopupMenuAppearance);
|
|
|
|
|
begin
|
|
|
|
|
FPopup.Assign(Value);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TSpkToolbarAppearance.SetTabAppearance(const Value: TSpkTabAppearance);
|
|
|
|
|
begin
|
|
|
|
|
FTab.Assign(Value);
|
|
|
|
@ -2375,4 +3003,5 @@ begin
|
|
|
|
|
FDispatch.NotifyAppearanceChanged;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|