Kaydet (Commit) 3bc5d730 authored tarafından Caolán McNamara's avatar Caolán McNamara

gtk3: we need to take margins in account for scrollbars

Change-Id: I406977acab12a2f805de1f57b91378e9b80195d4
üst 109d1d19
......@@ -408,9 +408,15 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
gtk_style_context_set_state(context, stateFlags);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_SLIDER);
GtkBorder margin;
gtk_style_context_get_margin(context, stateFlags, &margin);
gtk_render_slider(context, cr,
thumbRect.Left(), thumbRect.Top(),
thumbRect.GetWidth(), thumbRect.GetHeight(), scrollbarOrientation);
thumbRect.Left() + margin.left, thumbRect.Top() + margin.top,
thumbRect.GetWidth() - margin.left - margin.right,
thumbRect.GetHeight() - margin.top - margin.bottom,
scrollbarOrientation);
gtk_style_context_restore(context);
}
......
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