mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:55:56 +02:00
cocoa: updating font dialog initialization. bug #33990
git-svn-id: trunk@62529 -
This commit is contained in:
parent
4ac51dd8f4
commit
18ce1577f9
@ -548,6 +548,7 @@ var
|
|||||||
accessoryView: NSView;
|
accessoryView: NSView;
|
||||||
lRect: NSRect;
|
lRect: NSRect;
|
||||||
okButton, cancelButton: NSButton;
|
okButton, cancelButton: NSButton;
|
||||||
|
fn : NSFont;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseWSClass}
|
{$IFDEF VerboseWSClass}
|
||||||
DebugLn('TCocoaWSFontDialog.ShowModal for ' + ACommonDialog.Name);
|
DebugLn('TCocoaWSFontDialog.ShowModal for ' + ACommonDialog.Name);
|
||||||
@ -557,7 +558,10 @@ begin
|
|||||||
|
|
||||||
fontPanel := NSFontPanel.sharedFontPanel();
|
fontPanel := NSFontPanel.sharedFontPanel();
|
||||||
inFont := TCocoaFont(FontDialog.Font.Handle);
|
inFont := TCocoaFont(FontDialog.Font.Handle);
|
||||||
fontPanel.setPanelFont_isMultiple(inFont.Font, False);
|
fn := inFont.Font;
|
||||||
|
if (CocoaBasePPI<>72) and (CocoaBasePPI<>0) then
|
||||||
|
fn := NSFont.fontWithDescriptor_size(fn.fontDescriptor, fn.pointSize / CocoaBasePPI * 72);
|
||||||
|
fontPanel.setPanelFont_isMultiple(fn, False);
|
||||||
|
|
||||||
FontDelegate := TFontPanelDelegate.alloc.init();
|
FontDelegate := TFontPanelDelegate.alloc.init();
|
||||||
FontDelegate.FontPanel := FontPanel;
|
FontDelegate.FontPanel := FontPanel;
|
||||||
|
Loading…
Reference in New Issue
Block a user