You've already forked lazarus-ccr
SpkToolbar: Fix scaling of fonts set at designtime.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7974 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -387,13 +387,7 @@ type
|
||||
{$IF lcl_fullversion >= 1080000}
|
||||
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||
const AXProportion, AYProportion: Double); override;
|
||||
{$IF lcl_fullversion < 1080100}
|
||||
procedure FixDesignFontsPPI(const ADesignTimePPI: Integer);
|
||||
procedure ScaleFontsPPI(const AProportion: Double); override;
|
||||
{$ELSE}
|
||||
procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFEND}
|
||||
|
||||
{ Hi-DPI image list support }
|
||||
procedure SetImagesWidth(const AValue: Integer);
|
||||
@@ -412,6 +406,16 @@ type
|
||||
destructor Destroy; override;
|
||||
|
||||
|
||||
{ LCL Scaling }
|
||||
{$IF lcl_fullversion >= 1080000}
|
||||
{$IF lcl_fullversion < 1080100}
|
||||
procedure ScaleFontsPPI(const AProportion: Double); override;
|
||||
{$ELSE}
|
||||
procedure FixDesignFontsPPI(const ADesignTimePPI: Integer); override;
|
||||
procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// *************************
|
||||
// *** Dispatcher events ***
|
||||
// *************************
|
||||
@@ -2427,22 +2431,24 @@ begin
|
||||
end;
|
||||
|
||||
{$IF lcl_fullversion < 1080100}
|
||||
procedure TSpkToolbar.FixDesignFontsPPI(const ADesignTimePPI: Integer);
|
||||
begin
|
||||
inherited;
|
||||
DoFixDesignFontPPI(FAppearance.Tab.TabHeaderFont, ADesignTimePPI);
|
||||
DoFixDesignFontPPI(FAppearance.Pane.CaptionFont, ADesignTimePPI);
|
||||
DoFixDesignFontPPI(FAppearance.Element.CaptionFont, ADesignTimePPI);
|
||||
end;
|
||||
|
||||
procedure TSpkToolbar.ScaleFontsPPI(const AProportion: Double);
|
||||
begin
|
||||
inherited;
|
||||
DoScaleFontPPI(FAppearance.Tab.TabHeaderFont, AProportion);
|
||||
DoScaleFontPPI(FAppearance.Pane.CaptionFont, AProportion);
|
||||
DoScaleFontPPI(FAppearance.Element.CaptionFont, AProportion);
|
||||
DoScaleFontPPI(FAppearance.MenuButton.CaptionFont, AProportion);
|
||||
end;
|
||||
{$ELSE}
|
||||
procedure TSpkToolbar.FixDesignFontsPPI(const ADesignTimePPI: Integer);
|
||||
begin
|
||||
inherited;
|
||||
DoFixDesignFontPPI(FAppearance.Tab.TabHeaderFont, ADesignTimePPI);
|
||||
DoFixDesignFontPPI(FAppearance.Pane.CaptionFont, ADesignTimePPI);
|
||||
DoFixDesignFontPPI(FAppearance.Element.CaptionFont, ADesignTimePPI);
|
||||
DoFixDesignFontPPI(FAppearance.MenuButton.CaptionFont, ADesignTimePPI);
|
||||
end;
|
||||
|
||||
procedure TSpkToolbar.ScaleFontsPPI(const AToPPI: Integer;
|
||||
const AProportion: Double);
|
||||
begin
|
||||
@@ -2450,6 +2456,7 @@ begin
|
||||
DoScaleFontPPI(FAppearance.Tab.TabHeaderFont, AToPPI, AProportion);
|
||||
DoScaleFontPPI(FAppearance.Pane.CaptionFont, AToPPI, AProportion);
|
||||
DoScaleFontPPI(FAppearance.Element.CaptionFont, AToPPI, AProportion);
|
||||
DoScaleFontPPI(FAppearance.MenuButton.CaptionFont, AToPPI, AProportion);
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
Reference in New Issue
Block a user