diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-22 11:21:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-22 18:23:52 +0100 |
commit | 46efac592b76d32152353466120eea2c9800858f (patch) | |
tree | a9dc9e7f7ec69be79ac595ed8cf20a9a594d18df /vcl/source/window/menu.cxx | |
parent | db4c828913cfc8c33b8cc87b576fddcc2e705176 (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.cxx | 15 |
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 { |