Kaydet (Commit) 50a20f94 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

gtk: attempt to fix visual glitches around edit fields

Change-Id: I0c97840e610e6f2170a758afbd263ce6cd9e3129
üst f50f9c43
......@@ -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(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment