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