From db377e02c309c20419aef1360409be09fe50fc42 Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Tue, 2 Jul 2013 12:23:38 +0400 Subject: gtk3: Clearlooks theme paints scrollbar buttons depending on the style class Change-Id: I8e464e4b71671eccb2c0467d74542e6ddda0f5a6 --- vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index fd4282f1e0da..98da94498021 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -266,6 +266,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, gdouble arrow1Angle; // backward gdouble arrow2Angle; // forward Rectangle arrowRect; + const gchar* button1StyleClass = NULL; + const gchar* button2StyleClass = NULL; gint slider_width = 0; gint stepper_size = 0; gint stepper_spacing = 0; @@ -319,6 +321,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, scrollbarOrientation = GTK_ORIENTATION_HORIZONTAL; arrow1Angle = G_PI * 3 / 2; arrow2Angle = G_PI / 2; + button1StyleClass = GTK_STYLE_CLASS_LEFT; + button2StyleClass = GTK_STYLE_CLASS_RIGHT; if ( has_backward ) { @@ -359,6 +363,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, scrollbarOrientation = GTK_ORIENTATION_VERTICAL; arrow1Angle = 0; arrow2Angle = G_PI; + button1StyleClass = GTK_STYLE_CLASS_TOP; + button2StyleClass = GTK_STYLE_CLASS_BOTTOM; if ( has_backward ) { @@ -434,6 +440,7 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, gtk_style_context_save(context); gtk_style_context_set_state(context, stateFlags); gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON); + gtk_style_context_add_class(context, button1StyleClass); gtk_render_background(context, cr, button11BoundRect.Left(), button11BoundRect.Top(), @@ -460,6 +467,7 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, gtk_style_context_save(context); gtk_style_context_set_state(context, stateFlags); gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON); + gtk_style_context_add_class(context, button1StyleClass); gtk_render_background(context, cr, button12BoundRect.Left(), button12BoundRect.Top(), @@ -487,6 +495,7 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, gtk_style_context_save(context); gtk_style_context_set_state(context, stateFlags); gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON); + gtk_style_context_add_class(context, button2StyleClass); gtk_render_background(context, cr, button21BoundRect.Left(), button21BoundRect.Top(), @@ -513,6 +522,7 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, gtk_style_context_save(context); gtk_style_context_set_state(context, stateFlags); gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON); + gtk_style_context_add_class(context, button2StyleClass); gtk_render_background(context, cr, button22BoundRect.Left(), button22BoundRect.Top(), -- cgit