diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-24 12:17:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-24 17:14:02 +0100 |
commit | 3651482ef3a436bc1de01dcb333fa0cab7dc2d36 (patch) | |
tree | 34f74f2e4c56e160ea3a5052d7d95f7f3fed8b82 | |
parent | d2143755a50301796bab7aeb6cc1cf5af49378d3 (diff) |
hide menubar details
Change-Id: If9d30b4f1408f16cb84636245fc9039a0dd6bad0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111481
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/syswin.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 8b728a1af912..7841b0b657fb 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -195,6 +195,7 @@ public: MenuBar* GetMenuBar() const { return mpMenuBar; } void SetMenuBarMode( MenuBarMode nMode ); void CollectMenuBarMnemonics(MnemonicGenerator& rMnemonicGenerator) const; + int GetMenuBarHeight() const; void SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame, diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index ce04c182fd77..d9e2659e0fa8 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -21,7 +21,6 @@ #include <vcl/accel.hxx> #include <vcl/event.hxx> #include <vcl/help.hxx> -#include <vcl/menu.hxx> #include <vcl/ptrstyle.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> @@ -351,11 +350,7 @@ void BackingWindow::ApplyStyleSettings() // compute the menubar height sal_Int32 nMenuHeight = 0; if (SystemWindow* pSystemWindow = GetSystemWindow()) - { - MenuBar* pMenuBar = pSystemWindow->GetMenuBar(); - if (pMenuBar) - nMenuHeight = pMenuBar->GetMenuBarHeight(); - } + nMenuHeight = pSystemWindow->GetMenuBarHeight(); // fdo#34392: we do the layout dynamically, the layout depends on the font, // so we should handle data changed events (font changing) of the last child diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index b204135036bd..06e3482100e7 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1211,4 +1211,11 @@ void SystemWindow::CollectMenuBarMnemonics(MnemonicGenerator& rMnemonicGenerator } } +int SystemWindow::GetMenuBarHeight() const +{ + if (MenuBar* pMenuBar = GetMenuBar()) + return pMenuBar->GetMenuBarHeight(); + return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |