summaryrefslogtreecommitdiff
path: root/vcl/source/window/menu.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-22 11:21:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-01-22 18:23:52 +0100
commit46efac592b76d32152353466120eea2c9800858f (patch)
treea9dc9e7f7ec69be79ac595ed8cf20a9a594d18df /vcl/source/window/menu.cxx
parentdb4c828913cfc8c33b8cc87b576fddcc2e705176 (diff)
Resolves: tdf#122241 support persona header in native gtk3 menubar
Change-Id: Ia4485ec4c342c86f40e8e0bb7e5e1af1a47bb9b9 Reviewed-on: https://gerrit.libreoffice.org/66725 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r--vcl/source/window/menu.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 24b0c04abc88..4509ad496557 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2671,6 +2671,21 @@ bool MenuBar::HandleMenuButtonEvent( sal_uInt16 i_nButtonId )
return pMenuWin && pMenuWin->HandleMenuButtonEvent(i_nButtonId);
}
+int MenuBar::GetMenuBarHeight() const
+{
+ MenuBar* pMenuBar = const_cast<MenuBar*>(this);
+ const SalMenu *pNativeMenu = pMenuBar->ImplGetSalMenu();
+ int nMenubarHeight;
+ if (pNativeMenu)
+ nMenubarHeight = pNativeMenu->GetMenuBarHeight();
+ else
+ {
+ vcl::Window* pMenubarWin = GetWindow();
+ nMenubarHeight = pMenubarWin ? pMenubarWin->GetOutputHeightPixel() : 0;
+ }
+ return nMenubarHeight;
+}
+
// bool PopupMenu::bAnyPopupInExecute = false;
MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {