summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-10-12 21:55:43 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-10-13 13:50:38 +0400
commit50a20f94869c2033d495da7d57f9948988cd5ad9 (patch)
tree6b32fee43a02d39311b77b63b4b75e26eba7008e /vcl/unx/gtk
parentf50f9c43414403aca721612fdba9a9aa2dbdbf9b (diff)
gtk: attempt to fix visual glitches around edit fields
Change-Id: I0c97840e610e6f2170a758afbd263ce6cd9e3129
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 6fd600b87455..0b0c0a0afd57 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2236,13 +2236,23 @@ static void NWPaintOneEditBox( SalX11Screen nScreen,
NWSetWidgetState( widget, nState, stateType );
- /* This doesn't seem to be necessary, and it causes some weird glitch in
- * murrine (with the elementary theme for instance) but it fixes some issue
- * with Orta, so... */
+ gint xborder = widget->style->xthickness;
+ gint yborder = widget->style->ythickness;
+ gint bInteriorFocus, nFocusLineWidth;
+ gtk_widget_style_get( widget,
+ "interior-focus", &bInteriorFocus,
+ "focus-line-width", &nFocusLineWidth,
+ (char *)NULL);
+ if ( bInteriorFocus )
+ {
+ xborder += nFocusLineWidth;
+ yborder += nFocusLineWidth;
+ }
+
gtk_paint_flat_box( widget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
gdkRect, widget, "entry_bg",
- aEditBoxRect.Left(), aEditBoxRect.Top(),
- aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
+ aEditBoxRect.Left() + xborder, aEditBoxRect.Top() + yborder,
+ aEditBoxRect.GetWidth() - 2*xborder, aEditBoxRect.GetHeight() - 2*yborder );
gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
gdkRect, widget, "entry",
aEditBoxRect.Left(), aEditBoxRect.Top(),