summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2013-10-29 20:07:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-11-01 04:22:41 -0500
commit84f4b84212c1d3d27376a430d172f3382922f3f9 (patch)
tree6e5a670793d44b8ea266752eb3b1c692b89e0675 /vcl
parentdc6c7e844a02a59133e96553000666be87b1a74e (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx7
1 files changed, 2 insertions, 5 deletions
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 ) );