summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-22 21:45:13 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-06-23 01:28:06 +0000
commit2e266a77951ac54b9c72667e046440bb2b5d81b3 (patch)
treebcf81c5986b93fee0dd9a3d92f5ce3c70180cd59
parent81e6799d376f23d5079121a4c830f3662c2e7750 (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>
-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()