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

Caolán McNamara caolanm at redhat.com
Wed May 13 06:23:27 PDT 2015


 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 182c202d6d3fd9422bf3628a2fa4ccd7ab955c5e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 13 14:22:39 2015 +0100

    gtk3:don't even out the left/right top/bottom, take the figures as-is
    
    Change-Id: I2836446a8032b71c83feba5e3e669b5131a29ac1

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 711003f..40a662a 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -659,14 +659,16 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
     }
     else if( nPart == PART_SUB_EDIT )
     {
-        gint adjust_x = (gint) ((padding.left + padding.right) / 2) + nFocusWidth + nFocusPad;
-        gint adjust_y = (gint) ((padding.top + padding.bottom) / 2) + nFocusWidth + nFocusPad;
+        gint adjust_left = padding.left + nFocusWidth + nFocusPad;
+        gint adjust_top = padding.top + nFocusWidth + nFocusPad;
+        gint adjust_right = padding.right + nFocusWidth + nFocusPad;
+        gint adjust_bottom = padding.bottom + nFocusWidth + nFocusPad;
 
-        aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
-                                   aAreaRect.GetHeight() - 2 * adjust_y ) );
+        aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - (adjust_left + adjust_right),
+                                   aAreaRect.GetHeight() - (adjust_top + adjust_bottom)) );
         Point aEditPos = aAreaRect.TopLeft();
-        aEditPos.X() += adjust_x;
-        aEditPos.Y() += adjust_y;
+        aEditPos.X() += adjust_left;
+        aEditPos.Y() += adjust_top;
         aButtonRect.SetPos( aEditPos );
     }
 


More information about the Libreoffice-commits mailing list