Commit a72c4576 authored by Benjamin Otte's avatar Benjamin Otte

cssimagebuiltin: Remove icons that don't draw anything anymore

parent b049b3de
......@@ -127,11 +127,11 @@ gtk_check_button_update_node_state (GtkWidget *widget)
* way to update the icon
*/
if (state & GTK_STATE_FLAG_CHECKED)
image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED : GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED;
image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION : GTK_CSS_IMAGE_BUILTIN_CHECK;
else if (state & GTK_STATE_FLAG_INCONSISTENT)
image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT : GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT;
else
image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION : GTK_CSS_IMAGE_BUILTIN_CHECK;
image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
gtk_builtin_icon_set_image (GTK_BUILTIN_ICON (priv->indicator_gadget), image_type);
gtk_css_gadget_set_state (priv->indicator_gadget, state);
......
......@@ -863,19 +863,17 @@ gtk_css_image_builtin_draw (GtkCssImage *image,
case GTK_CSS_IMAGE_BUILTIN_NONE:
break;
case GTK_CSS_IMAGE_BUILTIN_CHECK:
case GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED:
case GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT:
gtk_css_image_builtin_draw_check (image, cr,
width, height,
image_type == GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED,
image_type == GTK_CSS_IMAGE_BUILTIN_CHECK,
image_type == GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT);
break;
case GTK_CSS_IMAGE_BUILTIN_OPTION:
case GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED:
case GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT:
gtk_css_image_builtin_draw_option (image, cr,
width, height,
image_type == GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED,
image_type == GTK_CSS_IMAGE_BUILTIN_OPTION,
image_type == GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT);
break;
case GTK_CSS_IMAGE_BUILTIN_ARROW_UP:
......
......@@ -233,10 +233,8 @@ enum { /*< skip >*/
typedef enum /*< skip >*/ {
GTK_CSS_IMAGE_BUILTIN_NONE,
GTK_CSS_IMAGE_BUILTIN_CHECK,
GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED,
GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT,
GTK_CSS_IMAGE_BUILTIN_OPTION,
GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED,
GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT,
GTK_CSS_IMAGE_BUILTIN_ARROW_UP,
GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN,
......
......@@ -210,12 +210,11 @@ gtk_model_button_update_state (GtkModelButton *button)
if (button->active && !button->menu_name)
{
indicator_state |= GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
}
else
{
indicator_state &= ~GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
}
}
if (button->role == GTK_BUTTON_ROLE_RADIO)
......@@ -223,12 +222,11 @@ gtk_model_button_update_state (GtkModelButton *button)
if (button->active && !button->menu_name)
{
indicator_state |= GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
}
else
{
indicator_state &= ~GTK_STATE_FLAG_CHECKED;
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
}
}
......
......@@ -52,9 +52,9 @@ gtk_do_render_check (GtkStyleContext *context,
if (state & GTK_STATE_FLAG_INCONSISTENT)
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT;
else if (state & GTK_STATE_FLAG_CHECKED)
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED;
else
image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
else
image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
gtk_css_style_render_icon (gtk_style_context_lookup_style (context), cr, x, y, width, height, image_type);
}
......@@ -117,9 +117,9 @@ gtk_do_render_option (GtkStyleContext *context,
if (state & GTK_STATE_FLAG_INCONSISTENT)
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT;
else if (state & GTK_STATE_FLAG_CHECKED)
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED;
else
image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
else
image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
gtk_css_style_render_icon (gtk_style_context_lookup_style (context), cr, x, y, width, height, image_type);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment