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

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


 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 85eb28ccb72b97f253418a925fe54fa6bc124d01
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 13 14:34:14 2015 +0100

    gtk3: don't include the focus pad and width in comboboxes
    
    otherwise the text inside them is getting clipped out.
    
    May have to revisit this when we get to drawing focus rects
    
    Change-Id: I3be4ce9d5e5540056974159d4ddb866c099958de

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 40a662a..14f75c7 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -638,19 +638,12 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
     Rectangle    aButtonRect;
     gint        nArrowWidth;
     gint        nButtonWidth;
-    gint        nFocusWidth;
-    gint        nFocusPad;
     GtkBorder   padding;
 
-    // Grab some button style attributes
-    gtk_style_context_get_style( mpButtonStyle,
-                                 "focus-line-width", &nFocusWidth,
-                                 "focus-padding", &nFocusPad,
-                                 NULL );
     gtk_style_context_get_padding( mpButtonStyle, GTK_STATE_FLAG_NORMAL, &padding);
 
     nArrowWidth = ARROW_SIZE;
-    nButtonWidth = nArrowWidth + padding.left + padding.right + (2 * (nFocusWidth+nFocusPad));
+    nButtonWidth = nArrowWidth + padding.left + padding.right;
     if( nPart == PART_BUTTON_DOWN )
     {
         aButtonRect.SetSize( Size( nButtonWidth, aAreaRect.GetHeight() ) );
@@ -659,10 +652,10 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
     }
     else if( nPart == PART_SUB_EDIT )
     {
-        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;
+        gint adjust_left = padding.left;
+        gint adjust_top = padding.top;
+        gint adjust_right = padding.right;
+        gint adjust_bottom = padding.bottom;
 
         aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - (adjust_left + adjust_right),
                                    aAreaRect.GetHeight() - (adjust_top + adjust_bottom)) );


More information about the Libreoffice-commits mailing list