[GTK] Slider thumb is not centered on the track with the unico theme

https://bugs.webkit.org/show_bug.cgi?id=72802

Patch by Martin Robinson <mrobinson@igalia.com> on 2012-01-03
Reviewed by Philippe Normand.

No new tests. This only applies to certain GTK+ themes.
Existing tests cover the default GTK+ theme.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the
slider thumb by the trough border.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3b05343a
2012-01-03 Martin Robinson <mrobinson@igalia.com>
[GTK] Slider thumb is not centered on the track with the unico theme
https://bugs.webkit.org/show_bug.cgi?id=72802
Reviewed by Philippe Normand.
No new tests. This only applies to certain GTK+ themes.
Existing tests cover the default GTK+ theme.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the
slider thumb by the trough border.
2012-01-03 Adrienne Walker <enne@google.com>
[chromium] Make tiled layer's tiler always exist
......@@ -663,12 +663,6 @@ bool RenderThemeGtk::paintSliderThumb(RenderObject* renderObject, const PaintInf
gtk_style_context_add_class(context, GTK_STYLE_CLASS_SCALE);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_SLIDER);
gint troughBorder;
gtk_style_context_get_style(context, "trough-border", &troughBorder, NULL);
IntRect sliderRect(rect);
sliderRect.inflate(-troughBorder);
guint flags = 0;
if (!isEnabled(renderObject) || isReadOnlyControl(renderObject))
flags |= GTK_STATE_FLAG_INSENSITIVE;
......@@ -678,7 +672,7 @@ bool RenderThemeGtk::paintSliderThumb(RenderObject* renderObject, const PaintInf
flags |= GTK_STATE_FLAG_ACTIVE;
gtk_style_context_set_state(context, static_cast<GtkStateFlags>(flags));
gtk_render_slider(context, paintInfo.context->platformContext()->cr(), sliderRect.x(), sliderRect.y(), sliderRect.width(), sliderRect.height(),
gtk_render_slider(context, paintInfo.context->platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height(),
part == SliderThumbHorizontalPart ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
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