Commit 4e077d46 authored by Benjamin Otte's avatar Benjamin Otte

gtk: Use new :checked state

on:
- GtkToggleButton
- GtkCheckButton
- GtkRadioButton
- GtkModelButton
- GtkCellRendererToggle
- GtkCheckMenuItem

also update themes:
- Adwaita
- Raleigh
but not the win32 theme.

The new :checked state replaces :active for the actual checkedness of
the widgets and :active is now used exclusively while the button is being
pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
parent 36a2e7ca
......@@ -386,12 +386,12 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
if (!priv->activatable)
state |= GTK_STATE_FLAG_INSENSITIVE;
state &= ~(GTK_STATE_FLAG_INCONSISTENT | GTK_STATE_FLAG_ACTIVE);
state &= ~(GTK_STATE_FLAG_INCONSISTENT | GTK_STATE_FLAG_CHECKED);
if (priv->inconsistent)
state |= GTK_STATE_FLAG_INCONSISTENT;
else if (priv->active)
state |= GTK_STATE_FLAG_ACTIVE;
state |= GTK_STATE_FLAG_CHECKED;
cairo_save (cr);
......
......@@ -561,17 +561,16 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
state &= ~(GTK_STATE_FLAG_INCONSISTENT |
GTK_STATE_FLAG_ACTIVE |
GTK_STATE_FLAG_SELECTED |
GTK_STATE_FLAG_CHECKED |
GTK_STATE_FLAG_PRELIGHT);
if (gtk_toggle_button_get_inconsistent (toggle_button))
state |= GTK_STATE_FLAG_INCONSISTENT;
else if (gtk_toggle_button_get_active (toggle_button) ||
(button->priv->button_down && button->priv->in_button))
state |= GTK_STATE_FLAG_ACTIVE;
else if (gtk_toggle_button_get_active (toggle_button))
state |= GTK_STATE_FLAG_CHECKED;
if (button->priv->activate_timeout || (button->priv->button_down && button->priv->in_button))
state |= GTK_STATE_FLAG_SELECTED;
state |= GTK_STATE_FLAG_ACTIVE;
if (button->priv->in_button)
state |= GTK_STATE_FLAG_PRELIGHT;
......
......@@ -576,7 +576,7 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
if (priv->inconsistent)
state |= GTK_STATE_FLAG_INCONSISTENT;
else if (priv->active)
state |= GTK_STATE_FLAG_ACTIVE;
state |= GTK_STATE_FLAG_CHECKED;
gtk_style_context_set_state (context, state);
......
......@@ -549,23 +549,19 @@ get_button_state (GtkModelButton *model_button)
state &= ~(GTK_STATE_FLAG_INCONSISTENT |
GTK_STATE_FLAG_ACTIVE |
GTK_STATE_FLAG_SELECTED |
GTK_STATE_FLAG_CHECKED |
GTK_STATE_FLAG_PRELIGHT);
if (model_button->toggled ||
(button->priv->button_down && button->priv->in_button))
state |= GTK_STATE_FLAG_ACTIVE;
if (model_button->toggled && !model_button->has_submenu)
state |= GTK_STATE_FLAG_CHECKED;
if (button->priv->activate_timeout ||
(button->priv->button_down && button->priv->in_button))
state |= GTK_STATE_FLAG_SELECTED;
state |= GTK_STATE_FLAG_ACTIVE;
if (button->priv->in_button)
state |= GTK_STATE_FLAG_PRELIGHT;
if (model_button->has_submenu)
state &= ~GTK_STATE_FLAG_ACTIVE;
return state;
}
......
......@@ -213,7 +213,7 @@ gtk_radio_button_init (GtkRadioButton *radio_button)
priv->group = g_slist_prepend (NULL, radio_button);
_gtk_button_set_depressed (GTK_BUTTON (radio_button), TRUE);
gtk_widget_set_state_flags (GTK_WIDGET (radio_button), GTK_STATE_FLAG_ACTIVE, TRUE);
gtk_widget_set_state_flags (GTK_WIDGET (radio_button), GTK_STATE_FLAG_CHECKED, TRUE);
}
static void
......@@ -765,7 +765,6 @@ gtk_radio_button_clicked (GtkButton *button)
GtkRadioButtonPrivate *priv = radio_button->priv;
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
GtkToggleButton *tmp_button;
GtkStateFlags new_state = 0;
GSList *tmp_list;
gint toggled;
gboolean depressed;
......@@ -774,10 +773,6 @@ gtk_radio_button_clicked (GtkButton *button)
g_object_ref (GTK_WIDGET (button));
new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
~(GTK_STATE_FLAG_PRELIGHT |
GTK_STATE_FLAG_ACTIVE);
if (gtk_toggle_button_get_active (toggle_button))
{
tmp_button = NULL;
......@@ -795,21 +790,11 @@ gtk_radio_button_clicked (GtkButton *button)
tmp_button = NULL;
}
if (!tmp_button)
{
if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
new_state |= GTK_STATE_FLAG_ACTIVE;
}
else
if (tmp_button)
{
toggled = TRUE;
_gtk_toggle_button_set_active (toggle_button,
!gtk_toggle_button_get_active (toggle_button));
if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
}
}
else
......@@ -830,11 +815,6 @@ gtk_radio_button_clicked (GtkButton *button)
break;
}
}
if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
new_state |= GTK_STATE_FLAG_ACTIVE;
}
if (gtk_toggle_button_get_inconsistent (toggle_button))
......@@ -844,11 +824,13 @@ gtk_radio_button_clicked (GtkButton *button)
else
depressed = gtk_toggle_button_get_active (toggle_button);
if (gtk_widget_get_state_flags (GTK_WIDGET (button)) != new_state)
gtk_widget_set_state_flags (GTK_WIDGET (button), new_state, TRUE);
if (toggled)
{
if (gtk_toggle_button_get_active (toggle_button))
gtk_widget_set_state_flags (GTK_WIDGET (button), GTK_STATE_FLAG_CHECKED, FALSE);
else
gtk_widget_unset_state_flags (GTK_WIDGET (button), GTK_STATE_FLAG_CHECKED);
gtk_toggle_button_toggled (toggle_button);
g_object_notify (G_OBJECT (toggle_button), "active");
......@@ -897,17 +879,17 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
state &= ~(GTK_STATE_FLAG_INCONSISTENT |
GTK_STATE_FLAG_ACTIVE |
GTK_STATE_FLAG_SELECTED |
GTK_STATE_FLAG_CHECKED |
GTK_STATE_FLAG_PRELIGHT);
if (gtk_toggle_button_get_inconsistent (toggle_button))
state |= GTK_STATE_FLAG_INCONSISTENT;
else if (gtk_toggle_button_get_active (toggle_button))
state |= GTK_STATE_FLAG_ACTIVE;
state |= GTK_STATE_FLAG_CHECKED;
if (button->priv->activate_timeout ||
(button->priv->button_down && button->priv->in_button))
state |= GTK_STATE_FLAG_SELECTED;
state |= GTK_STATE_FLAG_ACTIVE;
if (button->priv->in_button && !(state & GTK_STATE_FLAG_INSENSITIVE))
state |= GTK_STATE_FLAG_PRELIGHT;
......
......@@ -657,10 +657,19 @@ gtk_toggle_button_update_state (GtkButton *button)
new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
~(GTK_STATE_FLAG_INCONSISTENT |
GTK_STATE_FLAG_PRELIGHT |
GTK_STATE_FLAG_CHECKED |
GTK_STATE_FLAG_ACTIVE);
if (priv->inconsistent)
new_state |= GTK_STATE_FLAG_INCONSISTENT;
else if (priv->active)
new_state |= GTK_STATE_FLAG_CHECKED;
if (button->priv->in_button && button->priv->button_down)
new_state |= GTK_STATE_FLAG_ACTIVE;
if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
if (priv->inconsistent)
depressed = FALSE;
......@@ -669,12 +678,6 @@ gtk_toggle_button_update_state (GtkButton *button)
else
depressed = priv->active;
if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
if (depressed)
new_state |= GTK_STATE_FLAG_ACTIVE;
_gtk_button_set_depressed (button, depressed);
gtk_widget_set_state_flags (GTK_WIDGET (toggle_button), new_state, TRUE);
}
......@@ -288,20 +288,21 @@ $_dot_color: if($variant=='light', $selected_bg_color,
@include button(hover);
-gtk-image-effect: highlight;
}
&:active, &.flat:active {
&:active, &.flat:active,
&:checked, &.flat:checked {
@include button(active);
transition-duration: 50ms;
}
&:backdrop {
@include button(backdrop);
-gtk-image-effect: none;
&:active {
&:active, &:checked {
@include button(backdrop-active);
}
&:insensitive {
@include button(backdrop-insensitive);
}
&:insensitive:active {
&:insensitive:active, &:insensitive:checked {
@include button(backdrop-insensitive-active);
}
}
......@@ -311,7 +312,8 @@ $_dot_color: if($variant=='light', $selected_bg_color,
//}
&:insensitive {
@include button(insensitive);
&:active, &.flat:active {
&:active, &.flat:active,
&:checked, &.flat:checked {
@include button(insensitive-active);
}
}
......@@ -328,7 +330,7 @@ $_dot_color: if($variant=='light', $selected_bg_color,
icon-shadow: none;
@include button(osd);
&:hover { @include button(osd-hover); }
&:active { @include button(osd-active); }
&:active, &:checked { @include button(osd-active); }
&:insensitive { @include button(osd-insensitive); }
&:backdrop { @include button(osd-backdrop); }
}
......@@ -345,7 +347,7 @@ $_dot_color: if($variant=='light', $selected_bg_color,
@include button(osd-hover);
@extend %linked;
}
&:active {
&:active, &:checked {
@include button(osd-active);
@extend %linked;
}
......@@ -367,7 +369,7 @@ $_dot_color: if($variant=='light', $selected_bg_color,
&:hover {
@include button(hover,$b_color, white);
}
&:active {
&:active, &:checked {
@include button(active,$b_color, white);
}
&:backdrop {
......@@ -441,7 +443,9 @@ $_dot_color: if($variant=='light', $selected_bg_color,
}
}
&.needs-attention:active > GtkLabel,
&.needs-attention:active > GtkImage {
&.needs-attention:active > GtkImage,
&.needs-attention:checked > GtkLabel,
&.needs-attention:checked > GtkImage {
animation: none;
background-image: none;
}
......@@ -462,11 +466,13 @@ $_dot_color: if($variant=='light', $selected_bg_color,
.linked &,
.linked &:hover,
.linked &:active,
.linked &:checked,
.linked &:backdrop { @extend %linked; }
.linked.vertical &,
.linked.vertical &:hover,
.linked.vertical &:active,
.linked.vertical &:checked,
.linked.vertical &:backdrop { @extend %linked_vertical; }
}
......@@ -479,12 +485,16 @@ $_dot_color: if($variant=='light', $selected_bg_color,
// in this case, hence $noedge
&:hover { @include button(hover, $noedge: true); }
&:active { @include button(active, $noedge:true); }
&:checked{ @include button(active, $noedge:true); }
&:insensitive { @include button(insensitive, $noedge:true); }
&:insensitive:active { @include button(insensitive-active, $noedge:true); }
&:insensitive:checked { @include button(insensitive-active, $noedge:true); }
&:backdrop { @include button(backdrop); };
&:backdrop:active { @include button(backdrop-active); }
&:backdrop:checked { @include button(backdrop-active); }
&:backdrop:insensitive { @include button(backdrop-insensitive); }
&:backdrop:insensitive:active { @include button(backdrop-insensitive-active);}
&:backdrop:insensitive:checked { @include button(backdrop-insensitive-active);}
}
.inline-toolbar.toolbar GtkToolButton { // .inline-toolbar.toolbar here for
// higher specificity than the previous
......@@ -587,7 +597,7 @@ GtkColorButton.button {
color: $selected_bg_color; //FIXME use a proper color
@extend %undecorated_button;
text-shadow: none;
&:hover, &:active {
&:hover, &:active, &:checked {
@extend %undecorated_button;
color: mix($fg_color, $selected_bg_color, 40%); //FIXME same here
text-shadow: none;
......@@ -1625,7 +1635,7 @@ $asset_suffix: if($variant=='dark', '-dark', '');
//standard checks and radios
@each $s,$as in ('','-unchecked'),
(':hover', '-unchecked-hover'),
(':selected', '-unchecked-active'),
(':active', '-unchecked-active'),
(':insensitive','-unchecked-insensitive'),
(':backdrop', '-unchecked-backdrop'),
(':backdrop:insensitive', '-unchecked-backdrop-insensitive'),
......@@ -1635,12 +1645,12 @@ $asset_suffix: if($variant=='dark', '-dark', '');
(':inconsistent:backdrop', '-mixed-backdrop'),
(':inconsistent:insensitive', '-mixed-insensitive'),
(':inconsistent:insensitive:backdrop', '-mixed-backdrop-insensitive'),
(':active', '-checked'),
(':active:insensitive','-checked-insensitive'),
(':hover:active', '-checked-hover'),
(':active:selected', '-checked-active'),
(':backdrop:active', '-checked-backdrop'),
(':backdrop:active:insensitive', '-checked-backdrop-insensitive') {
(':checked', '-checked'),
(':checked:insensitive','-checked-insensitive'),
(':checked:hover', '-checked-hover'),
(':checked:active', '-checked-active'),
(':backdrop:checked', '-checked-backdrop'),
(':backdrop:checked:insensitive', '-checked-backdrop-insensitive') {
.#{$w}#{$s} {
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
......
......@@ -295,7 +295,7 @@
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);
-gtk-image-effect: highlight; }
.button:active, .button.flat:active {
.button:active, .button.flat:active, .button:checked, .button.flat:checked {
border-style: solid;
color: #eeeeec;
border-color: #1c1f1f;
......@@ -313,7 +313,7 @@
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
-gtk-image-effect: none; }
.button:backdrop:active {
.button:backdrop:active, .button:backdrop:checked {
border-style: solid;
color: #c9cbc9;
border-color: #1e2222;
......@@ -327,7 +327,7 @@
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.button:backdrop:insensitive:active {
.button:backdrop:insensitive:active, .button:backdrop:insensitive:checked {
border-style: solid;
color: #5d6767;
border-color: #1e2222;
......@@ -341,7 +341,7 @@
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
.button:insensitive:active, .button:insensitive.flat:active {
.button:insensitive:active, .button:insensitive.flat:active, .button:insensitive:checked, .button:insensitive.flat:checked {
border-style: solid;
color: #939695;
border-color: #1c1f1f;
......@@ -365,7 +365,7 @@
background-image: linear-gradient(to bottom, rgba(26, 26, 26, 0.6));
border-color: rgba(102, 102, 102, 0.8);
box-shadow: none; }
.button.osd:active {
.button.osd:active, .button.osd:checked {
border-style: solid;
background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.6));
border-color: rgba(102, 102, 102, 0.8);
......@@ -391,7 +391,7 @@
background-image: linear-gradient(to bottom, rgba(26, 26, 26, 0.6));
border-color: rgba(102, 102, 102, 0.8);
box-shadow: none; }
.osd .button:active {
.osd .button:active, .osd .button:checked {
border-style: solid;
background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.6));
border-color: rgba(102, 102, 102, 0.8);
......@@ -420,7 +420,7 @@
text-shadow: 0 -1px rgba(0, 0, 0, 0.67153);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.67153);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
.button.suggested-action:active {
.button.suggested-action:active, .button.suggested-action:checked {
border-style: solid;
color: white;
border-color: #0b1e33;
......@@ -470,7 +470,7 @@
text-shadow: 0 -1px rgba(0, 0, 0, 0.60878);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.60878);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
.button.destructive-action:active {
.button.destructive-action:active, .button.destructive-action:checked {
border-style: solid;
color: white;
border-color: #5e0707;
......@@ -533,7 +533,7 @@
background-size: 6px 6px, 0 0; }
.stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher > .button.needs-attention > GtkImage:dir(rtl) {
background-position: left 3px, left 2px; }
.stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher > .button.needs-attention:active > GtkImage {
.stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel, .stack-switcher > .button.needs-attention:checked > GtkImage {
animation: none;
background-image: none; }
.inline-toolbar .button, .inline-toolbar .button:backdrop {
......@@ -567,6 +567,14 @@
text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6); }
.inline-toolbar GtkToolButton > .button:checked {
border-style: solid;
color: #eeeeec;
border-color: #1c1f1f;
background-image: linear-gradient(to bottom, #232727, #2d3232);
text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6); }
.inline-toolbar GtkToolButton > .button:insensitive {
border-style: solid;
color: #939695;
......@@ -583,6 +591,14 @@
border-color: #1c1f1f;
background-image: linear-gradient(to bottom, #2f3333, #323636);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:insensitive:checked {
border-style: solid;
color: #939695;
border-color: #1c1f1f;
color: #939695;
border-color: #1c1f1f;
background-image: linear-gradient(to bottom, #2f3333, #323636);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop {
border-style: solid;
color: #c9cbc9;
......@@ -597,6 +613,12 @@
border-color: #1e2222;
background-image: linear-gradient(to bottom, #2f3434);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop:checked {
border-style: solid;
color: #c9cbc9;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #2f3434);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop:insensitive {
border-style: solid;
color: #5d6767;
......@@ -611,8 +633,14 @@
border-color: #1e2222;
background-image: linear-gradient(to bottom, #303434);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop:insensitive:checked {
border-style: solid;
color: #5d6767;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #303434);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button.flat, .inline-toolbar.search-bar GtkToolButton > .button.flat, .osd .button, .osd .button:hover, .osd .button:active, .osd .button:insensitive, .osd .button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked .button:hover, .linked .button:active, .linked .button:backdrop, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, GtkComboBox.combobox-entry .entry, GtkComboBox.combobox-entry .button, GtkComboBox.combobox-entry .button:backdrop, .linked > GtkComboBox > .button:dir(ltr) {
.inline-toolbar GtkToolButton > .button.flat, .inline-toolbar.search-bar GtkToolButton > .button.flat, .osd .button, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:insensitive, .osd .button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked .button:hover, .linked .button:active, .linked .button:checked, .linked .button:backdrop, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, GtkComboBox.combobox-entry .entry, GtkComboBox.combobox-entry .button, GtkComboBox.combobox-entry .button:backdrop, .linked > GtkComboBox > .button:dir(ltr) {
border-radius: 0;
border-left-style: none; }
.inline-toolbar GtkToolButton > .button.flat:dir(rtl), .inline-toolbar GtkToolButton:dir(rtl) > .button.flat, .inline-toolbar.search-bar GtkToolButton:dir(rtl) > .button.flat, .osd .button:dir(rtl), .inline-toolbar .button:dir(rtl), .linked .button:dir(rtl), .inline-toolbar GtkToolButton:only-child > .button.flat:dir(rtl), GtkComboBox.combobox-entry .entry:dir(rtl), GtkComboBox.combobox-entry .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
......@@ -631,7 +659,7 @@
border-radius: 3px;
border-style: solid; }
.linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:backdrop {
.linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop {
border-left-style: solid;
border-top-style: none; }
.linked.vertical .button:first-child {
......@@ -643,7 +671,7 @@
border-radius: 3px;
border-style: solid; }
.button.flat, .button.flat:backdrop, .button.flat:backdrop:insensitive, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive {
.button.flat, .button.flat:backdrop, .button.flat:backdrop:insensitive, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive {
border-color: transparent;
background-color: transparent;
background-image: none;
......@@ -678,7 +706,7 @@ GtkColorButton.button {
.button:link, .button:visited {
color: #215d9c;
text-shadow: none; }
.button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active {
.button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked {
color: #7397bc;
text-shadow: none; }
.button:link:backdrop, .button:visited:backdrop {
......@@ -1705,7 +1733,7 @@ GtkSwitch {
.check:hover {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-hover-dark.png"), url("assets/checkbox-unchecked-hover-dark@2.png")); }
.check:selected {
.check:active {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-active-dark.png"), url("assets/checkbox-unchecked-active-dark@2.png")); }
.check:insensitive {
......@@ -1735,22 +1763,22 @@ GtkSwitch {
.check:inconsistent:insensitive:backdrop {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-mixed-backdrop-insensitive-dark.png"), url("assets/checkbox-mixed-backdrop-insensitive-dark@2.png")); }
.check:active {
.check:checked {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-dark.png"), url("assets/checkbox-checked-dark@2.png")); }
.check:active:insensitive {
.check:checked:insensitive {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-insensitive-dark.png"), url("assets/checkbox-checked-insensitive-dark@2.png")); }
.check:hover:active {
.check:checked:hover {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-hover-dark.png"), url("assets/checkbox-checked-hover-dark@2.png")); }
.check:active:selected {
.check:checked:active {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-active-dark.png"), url("assets/checkbox-checked-active-dark@2.png")); }
.check:backdrop:active {
.check:backdrop:checked {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-backdrop-dark.png"), url("assets/checkbox-checked-backdrop-dark@2.png")); }
.check:backdrop:active:insensitive {
.check:backdrop:checked:insensitive {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-backdrop-insensitive-dark.png"), url("assets/checkbox-checked-backdrop-insensitive-dark@2.png")); }
.menuitem.check {
......@@ -1829,7 +1857,7 @@ GtkSwitch {
.radio:hover {
-gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-hover-dark.png"), url("assets/radio-unchecked-hover-dark@2.png")); }
.radio:selected {
.radio:active {
-gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-active-dark.png"), url("assets/radio-unchecked-active-dark@2.png")); }
.radio:insensitive {
......@@ -1859,22 +1887,22 @@ GtkSwitch {
.radio:inconsistent:insensitive:backdrop {
-gtk-icon-source: -gtk-scaled(url("assets/radio-mixed-backdrop-insensitive-dark.png"), url("assets/radio-mixed-backdrop-insensitive-dark@2.png")); }
.radio:active {
.radio:checked {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-dark.png"), url("assets/radio-checked-dark@2.png")); }
.radio:active:insensitive {
.radio:checked:insensitive {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-insensitive-dark.png"), url("assets/radio-checked-insensitive-dark@2.png")); }
.radio:hover:active {
.radio:checked:hover {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-hover-dark.png"), url("assets/radio-checked-hover-dark@2.png")); }
.radio:active:selected {
.radio:checked:active {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-active-dark.png"), url("assets/radio-checked-active-dark@2.png")); }
.radio:backdrop:active {
.radio:backdrop:checked {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-backdrop-dark.png"), url("assets/radio-checked-backdrop-dark@2.png")); }
.radio:backdrop:active:insensitive {
.radio:backdrop:checked:insensitive {
-gtk-icon-source: -gtk-scaled(url("assets/radio-checked-backdrop-insensitive-dark.png"), url("assets/radio-checked-backdrop-insensitive-dark@2.png")); }
.menuitem.radio {
......
......@@ -287,7 +287,7 @@
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
box-shadow: inset 0 1px white, 0 1px white;
-gtk-image-effect: highlight; }
.button:active, .button.flat:active {
.button:active, .button.flat:active, .button:checked, .button.flat:checked {
border-style: solid;
color: #2e3436;
border-color: #a1a1a1;
......@@ -305,7 +305,7 @@
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
-gtk-image-effect: none; }
.button:backdrop:active {
.button:backdrop:active, .button:backdrop:checked {
border-style: solid;
color: #54595a;
border-color: #a8a8a8;
......@@ -319,7 +319,7 @@
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.button:backdrop:insensitive:active {
.button:backdrop:insensitive:active, .button:backdrop:insensitive:checked {
border-style: solid;
color: #c7c7c7;
border-color: #a8a8a8;
......@@ -333,7 +333,7 @@
text-shadow: none;
icon-shadow: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
.button:insensitive:active, .button:insensitive.flat:active {
.button:insensitive:active, .button:insensitive.flat:active, .button:insensitive:checked, .button:insensitive.flat:checked {
border-style: solid;
color: #8d9091;
border-color: #a1a1a1;
......@@ -357,7 +357,7 @@
background-image: linear-gradient(to bottom, rgba(26, 26, 26, 0.6));
border-color: rgba(102, 102, 102, 0.8);
box-shadow: none; }
.button.osd:active {
.button.osd:active, .button.osd:checked {
border-style: solid;
background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.6));
border-color: rgba(102, 102, 102, 0.8);
......@@ -383,7 +383,7 @@
background-image: linear-gradient(to bottom, rgba(26, 26, 26, 0.6));
border-color: rgba(102, 102, 102, 0.8);
box-shadow: none; }
.osd .button:active {
.osd .button:active, .osd .button:checked {
border-style: solid;
background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.6));
border-color: rgba(102, 102, 102, 0.8);
......@@ -412,7 +412,7 @@
text-shadow: 0 -1px rgba(0, 0, 0, 0.51153);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.51153);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
.button.suggested-action:active {
.button.suggested-action:active, .button.suggested-action:checked {
border-style: solid;
color: white;
border-color: #1c5187;
......@@ -462,7 +462,7 @@
text-shadow: 0 -1px rgba(0, 0, 0, 0.52878);
icon-shadow: 0 -1px rgba(0, 0, 0, 0.52878);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
.button.destructive-action:active {
.button.destructive-action:active, .button.destructive-action:checked {
border-style: solid;
color: white;
border-color: #8e0b0b;
......@@ -525,7 +525,7 @@
background-size: 6px 6px, 0 0; }
.stack-switcher > .button.needs-attention > GtkLabel:dir(rtl), .stack-switcher > .button.needs-attention > GtkImage:dir(rtl) {
background-position: left 3px, left 4px; }
.stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher > .button.needs-attention:active > GtkImage {
.stack-switcher > .button.needs-attention:active > GtkLabel, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > GtkLabel, .stack-switcher > .button.needs-attention:checked > GtkImage {
animation: none;
background-image: none; }
.inline-toolbar .button, .inline-toolbar .button:backdrop {
......@@ -559,6 +559,14 @@
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6); }
.inline-toolbar GtkToolButton > .button:checked {
border-style: solid;
color: #2e3436;
border-color: #a1a1a1;
background-image: linear-gradient(to bottom, #d6d6d6, #e0e0e0);
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.07), inset 0 2px 1px -2px rgba(0, 0, 0, 0.6); }
.inline-toolbar GtkToolButton > .button:insensitive {
border-style: solid;
color: #8d9091;
......@@ -575,6 +583,14 @@
border-color: #a1a1a1;
background-image: linear-gradient(to bottom, #ebebeb, #f4f4f4);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:insensitive:checked {
border-style: solid;
color: #8d9091;
border-color: #a1a1a1;
color: #8d9091;
border-color: #a1a1a1;
background-image: linear-gradient(to bottom, #ebebeb, #f4f4f4);
box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop {
border-style: solid;
color: #54595a;
......@@ -589,6 +605,12 @@
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #d4d4d4);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
.inline-toolbar GtkToolButton > .button:backdrop:checked {
border-style: solid;
color: #54595a;
border-color: #a8a8a8;
background-image: linear-gradient(to bottom, #d4d4d4);
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0