mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 05:57:24 +01:00
Qt5: fixed initialization of font in InitStockFont(). issue #34625
git-svn-id: trunk@59709 -
This commit is contained in:
parent
5db60e1bdd
commit
91faa27f7b
@ -4810,10 +4810,18 @@ begin
|
|||||||
QtFont := QWidget_font(AMenu);
|
QtFont := QWidget_font(AMenu);
|
||||||
QFont_family(QtFont, @AName);
|
QFont_family(QtFont, @AName);
|
||||||
Font.Name := UTF16ToUTF8(AName);
|
Font.Name := UTF16ToUTF8(AName);
|
||||||
|
{$ifdef darwin}
|
||||||
|
// issue #34625
|
||||||
|
if QFont_pointSize(QtFont) > 0 then
|
||||||
|
Font.Height := -Round(QFont_pointSizeF(QtFont))
|
||||||
|
else
|
||||||
|
Font.Height := QFont_pixelSize(QtFont);
|
||||||
|
{$else}
|
||||||
if QFont_pointSize(QtFont) > 0 then
|
if QFont_pointSize(QtFont) > 0 then
|
||||||
Font.Size := QFont_pointSize(QtFont)
|
Font.Size := QFont_pointSize(QtFont)
|
||||||
else
|
else
|
||||||
Font.Height := QFont_pixelSize(QtFont);
|
Font.Height := QFont_pixelSize(QtFont);
|
||||||
|
{$endif}
|
||||||
if QFont_bold(QtFont) then
|
if QFont_bold(QtFont) then
|
||||||
Font.Style := Font.Style + [fsBold];
|
Font.Style := Font.Style + [fsBold];
|
||||||
if QFont_italic(QtFont) then
|
if QFont_italic(QtFont) then
|
||||||
@ -4837,10 +4845,18 @@ begin
|
|||||||
QApplication_font(QtFont);
|
QApplication_font(QtFont);
|
||||||
QFont_family(QtFont, @AName);
|
QFont_family(QtFont, @AName);
|
||||||
Font.Name := UTF16ToUTF8(AName);
|
Font.Name := UTF16ToUTF8(AName);
|
||||||
|
{$ifdef darwin}
|
||||||
|
// issue #34625
|
||||||
|
if QFont_pointSize(QtFont) > 0 then
|
||||||
|
Font.Height := -Round(QFont_pointSizeF(QtFont))
|
||||||
|
else
|
||||||
|
Font.Height := QFont_pixelSize(QtFont);
|
||||||
|
{$else}
|
||||||
if QFont_pointSize(QtFont) > 0 then
|
if QFont_pointSize(QtFont) > 0 then
|
||||||
Font.Size := QFont_pointSize(QtFont)
|
Font.Size := QFont_pointSize(QtFont)
|
||||||
else
|
else
|
||||||
Font.Height := QFont_pixelSize(QtFont);
|
Font.Height := QFont_pixelSize(QtFont);
|
||||||
|
{$endif}
|
||||||
if QFont_bold(QtFont) then
|
if QFont_bold(QtFont) then
|
||||||
Font.Style := Font.Style + [fsBold];
|
Font.Style := Font.Style + [fsBold];
|
||||||
if QFont_italic(QtFont) then
|
if QFont_italic(QtFont) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user