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

Samuel Mehrbrodt s.mehrbrodt at gmail.com
Fri Nov 1 10:23:01 CET 2013


 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 84f4b84212c1d3d27376a430d172f3382922f3f9
Author: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Date:   Tue Oct 29 20:07:42 2013 +0100

    Better approach for fdo#40077: Characters cropped in GTK-Combobox
    
    Now using gtk_widget_size_request() to get the native size.
    I reverted the earlier change (border_width etc. ignored)
    
    Change-Id: I0d89a2df5186bd27cbb77c8b0f2cc7b1fb247005
    Reviewed-on: https://gerrit.libreoffice.org/6478
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9821dee..67ab5a4 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -219,7 +219,6 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, GdkDrawable * gdkDrawable,
                                ControlState nState, const ImplControlValue& aValue,
                                const OUString& rCaption );
 
-//---
 static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
                             const ImplControlValue& aValue, const OUString& rCaption );
 
@@ -1147,7 +1146,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
         rNativeContentRegion = aIndicatorRect;
         returnVal = sal_True;
     }
-    if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX) && nPart == PART_ENTIRE_CONTROL )
+    if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX || nType == CTRL_COMBOBOX) && nPart == PART_ENTIRE_CONTROL )
     {
         NWEnsureGTKEditBox( m_nXScreen );
         GtkWidget* widget = gWidgetData[m_nXScreen].gEditBoxWidget;
@@ -2442,8 +2441,6 @@ static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen,
     return( buttonRect );
 }
 
-//---
-
 static void NWPaintOneSpinButton( SalX11Screen nScreen,
                                   GdkPixmap*            pixmap,
                                   ControlType            nType,
@@ -2609,7 +2606,7 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen,
         gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
                         nFocusWidth +
                         nFocusPad;
-        gint adjust_y = gWidgetData[nScreen].gComboWidget->style->ythickness;
+        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboWidget->style->ythickness;
         adjust_x     += gWidgetData[nScreen].gComboWidget->style->xthickness;
         aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
                                    aAreaRect.GetHeight() - 2 * adjust_y ) );


More information about the Libreoffice-commits mailing list