You've already forked lazarus-ccr
spkToolbar: Fix appearance fonts not being changeable (undo part of r5073 - High-DPI code for fonts must be put into application, not in component).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5345 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -31,7 +31,6 @@ type TSpkTabAppearance = class(TPersistent)
|
||||
// *** Gettery i settery ***
|
||||
|
||||
procedure SetHeaderFont(const Value: TFont);
|
||||
function GetTabHeaderFont: TFont;
|
||||
procedure SetBorderColor(const Value: TColor);
|
||||
procedure SetGradientFromColor(const Value: TColor);
|
||||
procedure SetGradientToColor(const Value: TColor);
|
||||
@ -47,7 +46,7 @@ type TSpkTabAppearance = class(TPersistent)
|
||||
destructor Destroy; override;
|
||||
procedure Reset;
|
||||
published
|
||||
property TabHeaderFont : TFont read GetTabHeaderFont write SetHeaderFont;
|
||||
property TabHeaderFont : TFont read FTabHeaderFont write SetHeaderFont;
|
||||
property BorderColor : TColor read FBorderColor write SetBorderColor;
|
||||
property GradientFromColor : TColor read FGradientFromColor write SetGradientFromColor;
|
||||
property GradientToColor : TColor read FGradientToColor write SetGradientToColor;
|
||||
@ -67,7 +66,6 @@ type TSpkPaneAppearance = class(TPersistent)
|
||||
FGradientType : TBackgroundKind;
|
||||
|
||||
procedure SetCaptionFont(const Value: TFont);
|
||||
function GetCaptionFont: TFont;
|
||||
procedure SetBorderDarkColor(const Value: TColor);
|
||||
procedure SetBorderLightColor(const Value: TColor);
|
||||
procedure SetGradientFromColor(const Value: TColor);
|
||||
@ -82,7 +80,7 @@ type TSpkPaneAppearance = class(TPersistent)
|
||||
destructor Destroy; override;
|
||||
procedure Reset;
|
||||
published
|
||||
property CaptionFont : TFont read GetCaptionFont write SetCaptionFont;
|
||||
property CaptionFont : TFont read FCaptionFont write SetCaptionFont;
|
||||
property BorderDarkColor : TColor read FBorderDarkColor write SetBorderDarkColor;
|
||||
property BorderLightColor : TColor read FBorderLightColor write SetBorderLightColor;
|
||||
property GradientFromColor : TColor read FGradientFromColor write SetGradientFromColor;
|
||||
@ -126,7 +124,6 @@ type TSpkElementAppearance = class(TPersistent)
|
||||
procedure SetActiveInnerDarkColor(const Value: TColor);
|
||||
procedure SetActiveInnerLightColor(const Value: TColor);
|
||||
procedure SetCaptionFont(const Value: TFont);
|
||||
function GetCaptionFont: TFont;
|
||||
procedure SetHotTrackCaptionColor(const Value: TColor);
|
||||
procedure SetHotTrackFrameColor(const Value: TColor);
|
||||
procedure SetHotTrackGradientFromColor(const Value: TColor);
|
||||
@ -149,7 +146,7 @@ type TSpkElementAppearance = class(TPersistent)
|
||||
destructor Destroy; override;
|
||||
procedure Reset;
|
||||
published
|
||||
property CaptionFont : TFont read GetCaptionFont write SetCaptionFont;
|
||||
property CaptionFont : TFont read FCaptionFont write SetCaptionFont;
|
||||
property IdleFrameColor : TColor read FIdleFrameColor write SetIdleFrameColor;
|
||||
property IdleGradientFromColor : TColor read FIdleGradientFromColor write SetIdleGradientFromColor;
|
||||
property IdleGradientToColor : TColor read FIdleGradientToColor write SetIdleGradientToColor;
|
||||
@ -383,29 +380,12 @@ begin
|
||||
FDispatch.NotifyAppearanceChanged;
|
||||
end;
|
||||
|
||||
function TSpkTabAppearance.GetTabHeaderFont: TFont;
|
||||
var
|
||||
ScaledFont: TFont;
|
||||
begin
|
||||
if DPI_AWARE then
|
||||
begin
|
||||
ScaledFont := TFont.Create;
|
||||
ScaledFont.Assign(FTabHeaderFont);
|
||||
//ScaledFont.Height := SpkScaleY(ScaledFont.Height, 96); // leave it to uscaledpi
|
||||
Result := ScaledFont;
|
||||
end
|
||||
else
|
||||
Result := FTabHeaderFont;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ TSpkPaneAppearance }
|
||||
|
||||
procedure TSpkPaneAppearance.Assign(Source: TPersistent);
|
||||
|
||||
var SrcAppearance : TSpkPaneAppearance;
|
||||
|
||||
var
|
||||
SrcAppearance : TSpkPaneAppearance;
|
||||
begin
|
||||
if Source is TSpkPaneAppearance then
|
||||
begin
|
||||
@ -428,11 +408,8 @@ end;
|
||||
constructor TSpkPaneAppearance.Create(ADispatch: TSpkBaseAppearanceDispatch);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
FDispatch:=ADispatch;
|
||||
|
||||
FCaptionFont:=TFont.Create;
|
||||
|
||||
Reset;
|
||||
end;
|
||||
|
||||
@ -598,22 +575,6 @@ begin
|
||||
FDispatch.NotifyAppearanceChanged;
|
||||
end;
|
||||
|
||||
function TSpkPaneAppearance.GetCaptionFont: TFont;
|
||||
var
|
||||
ScaledFont: TFont;
|
||||
begin
|
||||
if DPI_AWARE then
|
||||
begin
|
||||
ScaledFont := TFont.Create;
|
||||
ScaledFont.Assign(FCaptionFont);
|
||||
//ScaledFont.Height := SpkScaleY(ScaledFont.Height, 96); // leave it to uscaledpi
|
||||
Result := ScaledFont;
|
||||
end
|
||||
else
|
||||
Result := FCaptionFont;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ TSpkElementAppearance }
|
||||
|
||||
@ -974,21 +935,6 @@ begin
|
||||
FDispatch.NotifyAppearanceChanged;
|
||||
end;
|
||||
|
||||
function TSpkElementAppearance.GetCaptionFont: TFont;
|
||||
var
|
||||
ScaledFont: TFont;
|
||||
begin
|
||||
if DPI_AWARE then
|
||||
begin
|
||||
ScaledFont := TFont.Create;
|
||||
ScaledFont.Assign(FCaptionFont);
|
||||
//ScaledFont.Height := SpkScaleY(ScaledFont.Height, 96); // leave it to uscaledpi
|
||||
Result := ScaledFont;
|
||||
end
|
||||
else
|
||||
Result := FCaptionFont;
|
||||
end;
|
||||
|
||||
procedure TSpkElementAppearance.SetHotTrackCaptionColor(
|
||||
const Value: TColor);
|
||||
begin
|
||||
|
Reference in New Issue
Block a user