From 84f4b84212c1d3d27376a430d172f3382922f3f9 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Tue, 29 Oct 2013 20:07:42 +0100 Subject: Better approach for fdo#40077: Characters cropped in GTK-Combobox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 9821dee45e2b..67ab5a4df76b 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 ) ); -- cgit