From 5e30a095277d59be4a2d8da7e156fcaeff379ef9 Mon Sep 17 00:00:00 2001 From: ondrej Date: Wed, 2 Mar 2016 15:09:25 +0000 Subject: [PATCH] qt: fix GetMenuHeight, issue #28034 git-svn-id: trunk@51806 - --- lcl/interfaces/qt/qtobject.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index 56d1ebde23..5e2501aafd 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -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;