summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-03-17 18:31:59 +0100
committerAndras Timar <andras.timar@collabora.com>2021-05-06 12:51:31 +0200
commita92bff64d63d421a046d9642dcbb30c103ba16e2 (patch)
treedee8ba6ed01a0d50dc9e1da875a3e5c165e5d0bb
parent7798e74a8448d42bd311e1255000c3c9eaddaf6e (diff)
tdf#131031 take MenuBar into account on size change
in GtkSalFrame::SetPosSize when setting local vars for maGeometry.nWidth/nHeight the implicitely existing gtk native menu bar has to be taken into account. This can be done by extracting the values for it and re-apply to the new values. Change-Id: Ic0e76ecfd49fab7dbf330f3e26ab4a6ad3267b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112654 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit cc1690b9752b3fef3d541de0d26b7c7681615767) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112728 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 786aa40474d6..09ffd31a5255 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1479,8 +1479,13 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
{
m_bDefaultSize = false;
+ // tdf#131031 Just setting maGeometry.nWidth/nHeight will delete
+ // the evtl. implicitely existing space at top for the gtk native MenuBar,
+ // will make the Window too big and the StatusBar at the bottom vanish
+ // and thus breaks the fix in tdf#130841.
+ const int nImplicitMenuBarHeight(m_pSalMenu ? m_pSalMenu->GetMenuBarHeight() : 0);
maGeometry.nWidth = nWidth;
- maGeometry.nHeight = nHeight;
+ maGeometry.nHeight = nHeight - nImplicitMenuBarHeight;
if( isChild( false ) )
widget_set_size_request(nWidth, nHeight);