forked from AuroraMiddleware/gtk
css: Do inconsistent checked states right
In HTML5, both pseudoclasses apply. So we do the same thing in our widgets. https://bugzilla.gnome.org/show_bug.cgi?id=733967
This commit is contained in:
parent
bb069b781b
commit
1abe923740
@ -390,7 +390,8 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
||||
|
||||
if (priv->inconsistent)
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (priv->active)
|
||||
|
||||
if (priv->active)
|
||||
state |= GTK_STATE_FLAG_CHECKED;
|
||||
|
||||
cairo_save (cr);
|
||||
|
@ -566,7 +566,8 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
|
||||
|
||||
if (gtk_toggle_button_get_inconsistent (toggle_button))
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (gtk_toggle_button_get_active (toggle_button))
|
||||
|
||||
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))
|
||||
|
@ -575,7 +575,7 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
|
||||
|
||||
if (priv->inconsistent)
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (priv->active)
|
||||
if (priv->active)
|
||||
state |= GTK_STATE_FLAG_CHECKED;
|
||||
|
||||
gtk_style_context_set_state (context, state);
|
||||
|
@ -873,7 +873,8 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
|
||||
|
||||
if (gtk_toggle_button_get_inconsistent (toggle_button))
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (gtk_toggle_button_get_active (toggle_button))
|
||||
|
||||
if (gtk_toggle_button_get_active (toggle_button))
|
||||
state |= GTK_STATE_FLAG_CHECKED;
|
||||
|
||||
if (button->priv->activate_timeout ||
|
||||
|
@ -661,7 +661,8 @@ gtk_toggle_button_update_state (GtkButton *button)
|
||||
|
||||
if (priv->inconsistent)
|
||||
new_state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (priv->active)
|
||||
|
||||
if (priv->active)
|
||||
new_state |= GTK_STATE_FLAG_CHECKED;
|
||||
|
||||
if (button->priv->in_button && button->priv->button_down)
|
||||
|
Loading…
Reference in New Issue
Block a user