diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-06-22 21:45:13 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-06-22 21:46:31 +0200 |
commit | cbe60f979590615f61d914f1c937c69e89c58880 (patch) | |
tree | a3ad23b26dcbb9edbf6435dace822a203e625160 | |
parent | 70cba374f6862bb6b3568927267fc9e1fe3c0922 (diff) |
tdf#91971: Add the menubar size to the height computation too.
Change-Id: Ic03dc9e811df624ca492cd2688a30a1e07fe6496
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 12a77f01cb57..c81c18f4aac9 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -338,8 +338,18 @@ void BackingWindow::initControls() Resize(); + // compute the menubar height + sal_Int32 nMenuHeight = 0; + SystemWindow* pSystemWindow = GetSystemWindow(); + if (pSystemWindow) + { + MenuBar* pMenuBar = pSystemWindow->GetMenuBar(); + if (pMenuBar) + nMenuHeight = pMenuBar->ImplGetWindow()->GetOutputSizePixel().Height(); + } + set_width_request(mpAllRecentThumbnails->get_width_request() + mpAllButtonsBox->GetOptimalSize().Width()); - set_height_request(mpAllButtonsBox->GetOptimalSize().Height()); + set_height_request(nMenuHeight + mpAllButtonsBox->GetOptimalSize().Height()); } void BackingWindow::initializeLocalView() |