[gtk+/wip/otte/gadget: 30/30] switch: Port to gadgets
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gadget: 30/30] switch: Port to gadgets
- Date: Sun, 11 Oct 2015 18:20:57 +0000 (UTC)
commit e23a3f4583c31d0bc549607f7c8139420e9e7863
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 9 06:16:50 2015 +0100
switch: Port to gadgets
gtk/gtkswitch.c | 351 +++++++++++++++---------------
gtk/theme/Adwaita/_common.scss | 2 +-
gtk/theme/Adwaita/gtk-contained-dark.css | 18 +-
gtk/theme/Adwaita/gtk-contained.css | 18 +-
4 files changed, 190 insertions(+), 199 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 02e300b..c0f423f 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -51,8 +51,8 @@
#include "gtkactionable.h"
#include "a11y/gtkswitchaccessible.h"
#include "gtkactionhelper.h"
-#include "gtkcssnodeprivate.h"
-#include "gtkcssstylepropertyprivate.h"
+#include "gtkcsscustomgadgetprivate.h"
+#include "gtkcssgadgetprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcssshadowsvalueprivate.h"
@@ -72,7 +72,8 @@ struct _GtkSwitchPrivate
GtkGesture *pan_gesture;
GtkGesture *multipress_gesture;
- GtkCssNode *slider_node;
+ GtkCssGadget *gadget;
+ GtkCssGadget *slider_gadget;
double handle_pos;
gint64 start_time;
@@ -249,9 +250,6 @@ gtk_switch_pan_gesture_pan (GtkGesturePan *gesture,
{
GtkWidget *widget = GTK_WIDGET (sw);
GtkSwitchPrivate *priv = sw->priv;
- GtkStyleContext *context;
- GtkStateFlags state;
- GtkBorder padding;
gint width;
if (direction == GTK_PAN_DIRECTION_LEFT)
@@ -259,13 +257,6 @@ gtk_switch_pan_gesture_pan (GtkGesturePan *gesture,
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
- context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
-
- gtk_style_context_save_to_node (context, priv->slider_node);
- gtk_style_context_get_padding (context, state, &padding);
- gtk_style_context_restore (context);
-
width = gtk_widget_get_allocated_width (widget);
if (priv->is_active)
@@ -350,56 +341,102 @@ gtk_switch_activate (GtkSwitch *sw)
}
static void
-gtk_switch_get_preferred_width (GtkWidget *widget,
- gint *minimum,
- gint *natural)
+gtk_switch_get_slider_size (GtkCssGadget *gadget,
+ GtkOrientation orientation,
+ gint for_size,
+ gint *minimum,
+ gint *natural,
+ gint *minimum_baseline,
+ gint *natural_baseline,
+ gpointer unused)
+{
+ GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
+ gint slider_size;
+
+ if (orientation == GTK_ORIENTATION_VERTICAL)
+ {
+ gtk_widget_style_get (widget,
+ "slider-width", &slider_size,
+ NULL);
+ slider_size *= 0.6;
+ }
+ else
+ {
+ gtk_widget_style_get (widget,
+ "slider-height", &slider_size,
+ NULL);
+ }
+
+ *minimum = slider_size;
+ *natural = slider_size;
+}
+
+static void
+gtk_switch_get_content_size (GtkCssGadget *gadget,
+ GtkOrientation orientation,
+ gint for_size,
+ gint *minimum,
+ gint *natural,
+ gint *minimum_baseline,
+ gint *natural_baseline,
+ gpointer unused)
{
+ GtkWidget *widget;
GtkSwitch *self;
GtkSwitchPrivate *priv;
- GtkStyleContext *context;
- GtkStateFlags state;
- GtkBorder padding;
- gint width, slider_width;
+ gint slider_minimum, slider_natural;
PangoLayout *layout;
- PangoRectangle logical_rect;
+ PangoRectangle on_rect, off_rect;
+ widget = gtk_css_gadget_get_owner (gadget);
self = GTK_SWITCH (widget);
priv = self->priv;
- context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (context);
-
- gtk_style_context_save_to_node (context, priv->slider_node);
- gtk_style_context_get_padding (context, state, &padding);
- width = padding.left + padding.right;
-
- gtk_style_context_restore (context);
-
- gtk_widget_style_get (widget,
- "slider-width", &slider_width,
- NULL);
+ gtk_css_gadget_get_preferred_size (priv->slider_gadget,
+ orientation,
+ -1,
+ &slider_minimum, &slider_natural,
+ NULL, NULL);
/* Translators: if the "on" state label requires more than three
* glyphs then use MEDIUM VERTICAL BAR (U+2759) as the text for
* the state
*/
layout = gtk_widget_create_pango_layout (widget, C_("switch", "ON"));
- pango_layout_get_extents (layout, NULL, &logical_rect);
- pango_extents_to_pixels (&logical_rect, NULL);
- width += MAX (logical_rect.width, slider_width);
+ pango_layout_get_pixel_extents (layout, NULL, &on_rect);
/* Translators: if the "off" state label requires more than three
* glyphs then use WHITE CIRCLE (U+25CB) as the text for the state
*/
pango_layout_set_text (layout, C_("switch", "OFF"), -1);
- pango_layout_get_extents (layout, NULL, &logical_rect);
- pango_extents_to_pixels (&logical_rect, NULL);
- width += MAX (logical_rect.width, slider_width);
+ pango_layout_get_pixel_extents (layout, NULL, &off_rect);
g_object_unref (layout);
- *minimum = width;
- *natural = width;
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ {
+ int text_width = MAX (on_rect.width, off_rect.width);
+ *minimum = 2 * MAX (slider_minimum, text_width);
+ *natural = 2 * MAX (slider_natural, text_width);
+ }
+ else
+ {
+ int text_height = MAX (on_rect.height, off_rect.height);
+ *minimum = MAX (slider_minimum, text_height);
+ *natural = MAX (slider_natural, text_height);
+ }
+}
+
+static void
+gtk_switch_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+{
+ gtk_css_gadget_get_preferred_size (GTK_SWITCH (widget)->priv->gadget,
+ GTK_ORIENTATION_HORIZONTAL,
+ -1,
+ minimum, natural,
+ NULL, NULL);
}
static void
@@ -407,47 +444,30 @@ gtk_switch_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
- GtkSwitch *self;
- GtkSwitchPrivate *priv;
- GtkStyleContext *context;
- GtkStateFlags state;
- GtkBorder padding;
- gint height, slider_height;
- PangoLayout *layout;
- PangoRectangle logical_rect;
- gchar *str;
-
- self = GTK_SWITCH (widget);
- priv = self->priv;
- context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (context);
-
- gtk_style_context_save_to_node (context, priv->slider_node);
-
- gtk_style_context_get_padding (context, state, &padding);
-
- height = padding.top + padding.bottom;
-
- gtk_style_context_restore (context);
-
- gtk_widget_style_get (widget,
- "slider-height", &slider_height,
- NULL);
-
- str = g_strdup_printf ("%s%s",
- C_("switch", "ON"),
- C_("switch", "OFF"));
-
- layout = gtk_widget_create_pango_layout (widget, str);
- pango_layout_get_extents (layout, NULL, &logical_rect);
- pango_extents_to_pixels (&logical_rect, NULL);
- height += MAX (slider_height, logical_rect.height);
+ gtk_css_gadget_get_preferred_size (GTK_SWITCH (widget)->priv->gadget,
+ GTK_ORIENTATION_VERTICAL,
+ -1,
+ minimum, natural,
+ NULL, NULL);
+}
- g_object_unref (layout);
- g_free (str);
+static void
+gtk_switch_allocate_contents (GtkCssGadget *gadget,
+ const GtkAllocation *allocation,
+ int baseline,
+ GtkAllocation *out_clip,
+ gpointer unused)
+{
+ GtkSwitch *self = GTK_SWITCH (gtk_css_gadget_get_owner (gadget));
+ GtkSwitchPrivate *priv = self->priv;
- *minimum = height;
- *natural = height;
+ /* We pretend to allocate the full area to the slider. That way both
+ * potential left and right clip overlap gets correctly computed.
+ */
+ gtk_css_gadget_allocate (priv->slider_gadget,
+ allocation,
+ baseline,
+ out_clip);
}
static void
@@ -455,8 +475,6 @@ gtk_switch_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
- GtkStyleContext *context;
- GtkBorder extents;
GtkAllocation clip;
gtk_widget_set_allocation (widget, allocation);
@@ -468,26 +486,12 @@ gtk_switch_size_allocate (GtkWidget *widget,
allocation->width,
allocation->height);
- context = gtk_widget_get_style_context (widget);
-
- gtk_style_context_save (context);
-
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TROUGH);
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
-
- _gtk_css_shadows_value_get_extents (_gtk_style_context_peek_property (context,
- GTK_CSS_PROPERTY_BOX_SHADOW),
- &extents);
-
- gtk_style_context_restore (context);
-
- clip = *allocation;
- clip.x -= extents.left;
- clip.y -= extents.top;
- clip.width += extents.left + extents.right;
- clip.height += extents.top + extents.bottom;
-
- _gtk_widget_set_simple_clip (widget, &clip);
+ gtk_css_gadget_allocate (priv->gadget,
+ allocation,
+ gtk_widget_get_allocated_baseline (widget),
+ &clip);
+
+ gtk_widget_set_clip (widget, &clip);
}
static void
@@ -571,7 +575,7 @@ gtk_switch_paint_handle (GtkWidget *widget,
{
GtkStyleContext *context = gtk_widget_get_style_context (widget);
- gtk_style_context_save_to_node (context, GTK_SWITCH (widget)->priv->slider_node);
+ gtk_style_context_save_to_node (context, gtk_css_gadget_get_node (GTK_SWITCH
(widget)->priv->slider_gadget));
gtk_render_slider (context, cr,
box->x, box->y,
@@ -582,45 +586,29 @@ gtk_switch_paint_handle (GtkWidget *widget,
}
static gboolean
-gtk_switch_draw (GtkWidget *widget,
- cairo_t *cr)
+gtk_switch_render_slider (GtkCssGadget *gadget,
+ cairo_t *cr,
+ int width,
+ int height,
+ gpointer data)
{
+ return gtk_widget_has_visible_focus (gtk_css_gadget_get_owner (gadget));
+}
+
+static gboolean
+gtk_switch_render_trough (GtkCssGadget *gadget,
+ cairo_t *cr,
+ int width,
+ int height,
+ gpointer data)
+{
+ GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
- GtkStyleContext *context;
- GdkRectangle handle;
+ GtkStyleContext *context = gtk_widget_get_style_context (widget);
PangoLayout *layout;
PangoRectangle rect;
gint label_x, label_y;
- GtkBorder padding;
- GtkStateFlags state;
- gint x, y, width, height;
-
- context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
-
- gtk_style_context_save_to_node (context, priv->slider_node);
-
- gtk_style_context_get_padding (context, state, &padding);
-
- gtk_style_context_restore (context);
-
- x = 0;
- y = 0;
- width = gtk_widget_get_allocated_width (widget);
- height = gtk_widget_get_allocated_height (widget);
-
- gtk_render_background (context, cr, x, y, width, height);
- gtk_render_frame (context, cr, x, y, width, height);
-
- width -= padding.left + padding.right;
- height -= padding.top + padding.bottom;
-
- x += padding.left;
- y += padding.top;
-
- handle.y = y;
- handle.width = width / 2;
- handle.height = height;
+ gint slider_offset;
/* Translators: if the "on" state label requires more than three
* glyphs then use MEDIUM VERTICAL BAR (U+2759) as the text for
@@ -628,11 +616,10 @@ gtk_switch_draw (GtkWidget *widget,
*/
layout = gtk_widget_create_pango_layout (widget, C_("switch", "ON"));
- pango_layout_get_extents (layout, NULL, &rect);
- pango_extents_to_pixels (&rect, NULL);
+ pango_layout_get_pixel_extents (layout, NULL, &rect);
- label_x = x + ((width / 2) - rect.width) / 2;
- label_y = y + (height - rect.height) / 2;
+ label_x = ((width / 2) - rect.width) / 2;
+ label_y = (height - rect.height) / 2;
gtk_render_layout (context, cr, label_x, label_y, layout);
@@ -643,26 +630,36 @@ gtk_switch_draw (GtkWidget *widget,
*/
layout = gtk_widget_create_pango_layout (widget, C_("switch", "OFF"));
- pango_layout_get_extents (layout, NULL, &rect);
- pango_extents_to_pixels (&rect, NULL);
+ pango_layout_get_pixel_extents (layout, NULL, &rect);
- label_x = x + (width / 2) + ((width / 2) - rect.width) / 2;
- label_y = y + (height - rect.height) / 2;
+ label_x = (width / 2) + ((width / 2) - rect.width) / 2;
+ label_y = (height - rect.height) / 2;
gtk_render_layout (context, cr, label_x, label_y, layout);
g_object_unref (layout);
- handle.x = x + round (priv->handle_pos * width / 2);
+ slider_offset = round (priv->handle_pos * (width - width / 2));
+ cairo_translate (cr, slider_offset, 0);
- gtk_switch_paint_handle (widget, cr, &handle);
+ gtk_css_gadget_draw (priv->slider_gadget,
+ cr,
+ width / 2,
+ height);
- if (gtk_widget_has_visible_focus (widget))
- {
- gtk_render_focus (context, cr,
- handle.x, handle.y,
- handle.width, handle.height);
- }
+ cairo_translate (cr, -slider_offset, 0);
+
+ return FALSE;
+}
+
+static gboolean
+gtk_switch_draw (GtkWidget *widget,
+ cairo_t *cr)
+{
+ gtk_css_gadget_draw (GTK_SWITCH (widget)->priv->gadget,
+ cr,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
return FALSE;
}
@@ -841,6 +838,9 @@ gtk_switch_dispose (GObject *object)
priv->action = NULL;
}
+ g_clear_object (&priv->gadget);
+ g_clear_object (&priv->slider_gadget);
+
g_clear_object (&priv->pan_gesture);
g_clear_object (&priv->multipress_gesture);
@@ -872,26 +872,6 @@ state_set (GtkSwitch *sw, gboolean state)
}
static void
-node_style_changed_cb (GtkCssNode *node,
- GtkCssStyle *old_style,
- GtkCssStyle *new_style,
- GtkWidget *widget)
-{
- GtkBitmask *changes = gtk_css_style_get_difference (old_style, new_style);
- static GtkBitmask *affects_size = NULL;
-
- if (G_UNLIKELY (affects_size == NULL))
- affects_size = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_CLIP);
-
- if (_gtk_bitmask_intersects (changes, affects_size))
- gtk_widget_queue_resize (widget);
- else
- gtk_widget_queue_draw (widget);
-
- _gtk_bitmask_free (changes);
-}
-
-static void
gtk_switch_class_init (GtkSwitchClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
@@ -1062,13 +1042,24 @@ gtk_switch_init (GtkSwitch *self)
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
widget_node = gtk_widget_get_css_node (GTK_WIDGET (self));
- priv->slider_node = gtk_css_node_new ();
- gtk_css_node_set_widget_type (priv->slider_node, GTK_TYPE_SWITCH);
- gtk_css_node_add_class (priv->slider_node, g_quark_from_string (GTK_STYLE_CLASS_SLIDER));
- gtk_css_node_set_parent (priv->slider_node, widget_node);
- gtk_css_node_set_state (priv->slider_node, gtk_css_node_get_state (widget_node));
- g_signal_connect_object (priv->slider_node, "style-changed", G_CALLBACK (node_style_changed_cb), self, 0);
- g_object_unref (priv->slider_node);
+ priv->gadget = gtk_css_custom_gadget_new_for_node (widget_node,
+ GTK_WIDGET (self),
+ gtk_switch_get_content_size,
+ gtk_switch_allocate_contents,
+ gtk_switch_render_trough,
+ NULL,
+ NULL);
+
+ priv->slider_gadget = gtk_css_custom_gadget_new ("slider",
+ GTK_WIDGET (self),
+ priv->gadget,
+ NULL,
+ gtk_switch_get_slider_size,
+ NULL,
+ gtk_switch_render_slider,
+ NULL,
+ NULL);
+ gtk_css_gadget_add_class (priv->slider_gadget, GTK_STYLE_CLASS_SLIDER);
gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), FALSE);
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 165e964..451afe0 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2006,7 +2006,7 @@ GtkSwitch {
}
}
}
- &.slider {
+ .slider {
border: 1px solid;
border-radius: 3px;
@include button(normal);
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 680fac5..fa7bdf9 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2408,7 +2408,7 @@ GtkSwitch {
border-color: #1e2222;
background-image: none;
background-color: #323636; }
- GtkSwitch.slider {
+ GtkSwitch .slider {
border: 1px solid;
border-radius: 3px;
color: #eeeeec;
@@ -2419,7 +2419,7 @@ GtkSwitch {
icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px
#2a2f2f; }
- GtkSwitch.slider:hover {
+ GtkSwitch .slider:hover {
color: #eeeeec;
outline-color: rgba(238, 238, 236, 0.3);
border-color: #1c1f1f;
@@ -2428,18 +2428,18 @@ GtkSwitch {
icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px
#2a2f2f; }
- GtkSwitch.slider:active {
+ GtkSwitch .slider:active {
border: 1px solid #0f2b48; }
- GtkSwitch.slider:insensitive {
+ GtkSwitch .slider:insensitive {
color: #939695;
border-color: #1c1f1f;
background-image: linear-gradient(to bottom, #323636);
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
- GtkSwitch.slider:insensitive > .label {
+ GtkSwitch .slider:insensitive > .label {
color: inherit; }
- GtkSwitch.slider:backdrop {
+ GtkSwitch .slider:backdrop {
color: #939695;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #393f3f);
@@ -2447,9 +2447,9 @@ GtkSwitch {
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0);
box-shadow: none; }
- GtkSwitch.slider:backdrop:active {
+ GtkSwitch .slider:backdrop:active {
border-color: #0f2b48; }
- GtkSwitch.slider:backdrop:insensitive {
+ GtkSwitch .slider:backdrop:insensitive {
color: #5d6767;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #323636);
@@ -2457,7 +2457,7 @@ GtkSwitch {
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0);
box-shadow: none; }
- GtkSwitch.slider:backdrop:insensitive > .label {
+ GtkSwitch .slider:backdrop:insensitive > .label {
color: inherit; }
/*************************
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index c2bb097..cfad11d 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2415,7 +2415,7 @@ GtkSwitch {
border-color: #a8a8a8;
background-image: none;
background-color: #f4f4f4; }
- GtkSwitch.slider {
+ GtkSwitch .slider {
border: 1px solid;
border-radius: 3px;
color: #2e3436;
@@ -2426,7 +2426,7 @@ GtkSwitch {
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
box-shadow: inset 0 1px white, 0 1px white;
box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
- GtkSwitch.slider:hover {
+ GtkSwitch .slider:hover {
color: #2e3436;
outline-color: rgba(46, 52, 54, 0.3);
border-color: #a1a1a1;
@@ -2435,18 +2435,18 @@ GtkSwitch {
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
box-shadow: inset 0 1px white, 0 1px white;
box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
- GtkSwitch.slider:active {
+ GtkSwitch .slider:active {
border: 1px solid #184472; }
- GtkSwitch.slider:insensitive {
+ GtkSwitch .slider:insensitive {
color: #8d9091;
border-color: #a1a1a1;
background-image: linear-gradient(to bottom, #f4f4f4);
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
- GtkSwitch.slider:insensitive > .label {
+ GtkSwitch .slider:insensitive > .label {
color: inherit; }
- GtkSwitch.slider:backdrop {
+ GtkSwitch .slider:backdrop {
color: #8d9091;
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #ededed);
@@ -2454,9 +2454,9 @@ GtkSwitch {
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
box-shadow: none; }
- GtkSwitch.slider:backdrop:active {
+ GtkSwitch .slider:backdrop:active {
border-color: #4a90d9; }
- GtkSwitch.slider:backdrop:insensitive {
+ GtkSwitch .slider:backdrop:insensitive {
color: #c7c7c7;
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #f4f4f4);
@@ -2464,7 +2464,7 @@ GtkSwitch {
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
box-shadow: none; }
- GtkSwitch.slider:backdrop:insensitive > .label {
+ GtkSwitch .slider:backdrop:insensitive > .label {
color: inherit; }
.list-row:selected GtkSwitch {
box-shadow: none;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]