modelbutton: Fix state confusion

Checked buttons were getting the wrong image.
This commit is contained in:
Matthias Clasen 2015-12-19 21:56:05 -05:00
parent f0fba02dca
commit f7236b261b

View File

@ -207,12 +207,12 @@ gtk_model_button_update_state (GtkModelButton *button)
{
if (button->active && !button->menu_name)
{
state &= ~GTK_STATE_FLAG_CHECKED;
state |= GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED;
}
else
{
state |= GTK_STATE_FLAG_CHECKED;
state &= ~GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
}
}
@ -220,12 +220,12 @@ gtk_model_button_update_state (GtkModelButton *button)
{
if (button->active && !button->menu_name)
{
state &= ~GTK_STATE_FLAG_CHECKED;
state |= GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED;
}
else
{
state |= GTK_STATE_FLAG_CHECKED;
state &= ~GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
}
}