[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Tue Oct 17 15:27:37 UTC 2017


 vcl/unx/gtk3/gtk3gtkframe.cxx |   21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

New commits:
commit 19a7c81d3ce2a8a7b9a6ed305e474a80fd286ddf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 17 14:23:05 2017 +0100

    gtk3: drop faking initial nTopDecoration size from parent
    
    in rtl we change the x pos. To change the x pos we need a y pos to go
    with it, and taking the y pos before we get the true (0) top decoration
    size of menu and menu-like widgets means rtl popdowns like the color
    and highlight popdowns are vertically misplaced
    
    there's no reason that a window would share the same decoration value
    as its parent
    
    Change-Id: I8cd1e96bb8ef7b0b728ff1baac5ee069325f9753
    Reviewed-on: https://gerrit.libreoffice.org/43458
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4b17e9e3ef89..7efff4679d54 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1124,28 +1124,17 @@ void GtkSalFrame::InitCommon()
     m_nHeightRequest = 0;
 
     // fake an initial geometry, gets updated via configure event or SetPosSize
-    if( m_bDefaultPos || m_bDefaultSize )
+    if (m_bDefaultPos || m_bDefaultSize)
     {
         Size aDefSize = calcDefaultSize();
         maGeometry.nX                   = -1;
         maGeometry.nY                   = -1;
         maGeometry.nWidth               = aDefSize.Width();
         maGeometry.nHeight              = aDefSize.Height();
-        if( m_pParent )
-        {
-            // approximation
-            maGeometry.nTopDecoration       = m_pParent->maGeometry.nTopDecoration;
-            maGeometry.nBottomDecoration    = m_pParent->maGeometry.nBottomDecoration;
-            maGeometry.nLeftDecoration      = m_pParent->maGeometry.nLeftDecoration;
-            maGeometry.nRightDecoration     = m_pParent->maGeometry.nRightDecoration;
-        }
-        else
-        {
-            maGeometry.nTopDecoration       = 0;
-            maGeometry.nBottomDecoration    = 0;
-            maGeometry.nLeftDecoration      = 0;
-            maGeometry.nRightDecoration     = 0;
-        }
+        maGeometry.nTopDecoration       = 0;
+        maGeometry.nBottomDecoration    = 0;
+        maGeometry.nLeftDecoration      = 0;
+        maGeometry.nRightDecoration     = 0;
     }
     updateScreenNumber();
 


More information about the Libreoffice-commits mailing list