mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 17:39:44 +02:00
cocoa: don't change buttons font, if a custom font has been selected
git-svn-id: trunk@61768 -
This commit is contained in:
parent
159d5cc8cc
commit
462398fd23
@ -258,6 +258,7 @@ type
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
class function GetTextLen(const AWinControl: TWinControl; var ALength: Integer): Boolean; override;
|
||||
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||
end;
|
||||
|
||||
{ TLCLCheckBoxCallback }
|
||||
@ -743,6 +744,15 @@ begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSButton.SetFont(const AWinControl: TWinControl;
|
||||
const AFont: TFont);
|
||||
begin
|
||||
if not (AWinControl.HandleAllocated) then Exit;
|
||||
TCocoaWSWinControl.SetFont(AWinControl, AFont);
|
||||
TCocoaButton(AWinControl.Handle).adjustFontToControlSize := (AFont.Name = 'default')
|
||||
and (AFont.Size = 0);
|
||||
end;
|
||||
|
||||
{ TCocoaWSCustomCheckBox }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user