mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 19:40:06 +02:00
parent
aa7d1d4437
commit
5e30a09527
@ -1841,7 +1841,7 @@ var
|
||||
Size: TSize;
|
||||
begin
|
||||
{$IFDEF DARWIN}
|
||||
FCachedMenuBarHeight := 1;
|
||||
Exit(0);
|
||||
{$ENDIF}
|
||||
if FCachedMenuBarHeight = -1 then
|
||||
begin
|
||||
@ -1854,19 +1854,10 @@ begin
|
||||
QMenuBar_sizeHint(AMenuBar, @Size);
|
||||
QMainWindow_destroy(DummyWindow);
|
||||
FCachedMenuBarHeight := Size.cy;
|
||||
|
||||
if QStyle_styleHint(QApplication_style(),
|
||||
QStyleSH_MainWindow_SpaceBelowMenuBar) > 0 then
|
||||
inc(FCachedMenuBarHeight, 4);
|
||||
if QStyle_styleHint(QApplication_style(),
|
||||
QStyleSH_ScrollView_FrameOnlyAroundContents) > 0 then
|
||||
inc(FCachedMenuBarHeight, 4);
|
||||
end;
|
||||
if (FCachedMenuBarHeight <= 0) then
|
||||
begin
|
||||
FCachedMenuBarHeight := 22;
|
||||
if QStyle_styleHint(QApplication_style(), QStyleSH_MainWindow_SpaceBelowMenuBar) > 0 then
|
||||
inc(FCachedMenuBarHeight, 4);
|
||||
end;
|
||||
Result := FCachedMenuBarHeight;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user