[gnome-themes-standard] engine: don't use a custom property for GtkSwitch slider lines



commit e1fded1c3b555e40cdcfc07456bebe96bf7d9041
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Dec 2 12:03:00 2011 -0500

    engine: don't use a custom property for GtkSwitch slider lines
    
    We can just use color here...

 src/adwaita_engine.c                   |   15 +++------------
 themes/Adwaita/gtk-3.0/gtk-widgets.css |    2 +-
 2 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index eb6457d..272d124 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -568,16 +568,14 @@ render_switch_lines (GtkThemingEngine *engine,
                      GtkOrientation orientation)
 {
   GtkStateFlags state;
-  GdkRGBA *lines_color;
+  GdkRGBA lines_color;
 
   state = gtk_theming_engine_get_state (engine);
 
   if (state & GTK_STATE_FLAG_INSENSITIVE)
     return;
 
-  gtk_theming_engine_get (engine, state,
-                          "-adwaita-switch-grip-color", &lines_color,
-                          NULL);
+  gtk_theming_engine_get_color (engine, state, &lines_color);
 
   cairo_save (cr);
 
@@ -595,12 +593,10 @@ render_switch_lines (GtkThemingEngine *engine,
   cairo_move_to (cr, 8.0, 0.0);
   cairo_line_to (cr, 8.0, 6.0);
 
-  gdk_cairo_set_source_rgba (cr, lines_color);
+  gdk_cairo_set_source_rgba (cr, &lines_color);
   cairo_stroke (cr);
 
   cairo_restore (cr);
-
-  gdk_rgba_free (lines_color);
 }
 
 static void
@@ -799,11 +795,6 @@ adwaita_engine_class_init (AdwaitaEngineClass *klass)
                                                             "Menuitem arrow color",
                                                             GDK_TYPE_RGBA, 0));
   gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
-                                        g_param_spec_boxed ("switch-grip-color",
-                                                            "Switch grip color",
-                                                            "Switch grip color",
-                                                            GDK_TYPE_RGBA, 0));
-  gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
                                         g_param_spec_boxed ("progressbar-pattern",
                                                             "Progressbar pattern",
                                                             "Progressbar pattern",
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index a07488f..4b0a111 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -1354,7 +1354,7 @@ GtkSwitch.slider {
                                      from (@theme_base_color),
                                      to (@switch_slider_color));
 
-    -adwaita-switch-grip-color: shade (@switch_slider_color, 0.95);
+    color: shade (@switch_slider_color, 0.95);
 }
 
 GtkSwitch.slider:active {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]