summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-22 21:45:13 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:51:34 +0200
commit9a056f921f3d9b26be08cb1a636ada307ecfc469 (patch)
treea0c8c46834efc3f7fb554b3c65537dabbc797382 /sfx2/source/dialog
parent8e29dfd2911cc9a09e5b1524ad2d10dd565db6a7 (diff)
tdf#91971: Add the menubar size to the height computation too.
Change-Id: Ic03dc9e811df624ca492cd2688a30a1e07fe6496 Reviewed-on: https://gerrit.libreoffice.org/16414 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index d58f8562baa8..22d4e803b407 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()