diff options
author | Benjamin Otte <otte@redhat.com> | 2016-12-18 22:31:18 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-20 18:01:12 +0100 |
commit | 071c9a8221b53ab3e3586349187119221621d00a (patch) | |
tree | fa8e4a997894283cb47710759e43b3171240a042 /gtk/gtkrenderbackground.c | |
parent | 15e8a22f0803297cfce64adb5c1ebd95f7518b6c (diff) | |
download | gtk+-071c9a8221b53ab3e3586349187119221621d00a.tar.gz |
API: gdk: Add gdk_rgba_is_clear() and gdk_rgba_is_opaque()
I want to use these inside GSK, and I'm not a fan of putting GdkRGBA
APIs into it or duplicating it into GTK.
So public API it is.
Diffstat (limited to 'gtk/gtkrenderbackground.c')
-rw-r--r-- | gtk/gtkrenderbackground.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkrenderbackground.c b/gtk/gtkrenderbackground.c index 4beafb203d..1e2a5e672a 100644 --- a/gtk/gtkrenderbackground.c +++ b/gtk/gtkrenderbackground.c @@ -86,7 +86,7 @@ gtk_theming_background_snapshot_color (GtkThemingBackground *bg, (gtk_css_style_get_value (bg->style, GTK_CSS_PROPERTY_BACKGROUND_CLIP), n_values - 1)); - if (gtk_rgba_is_clear (bg_color)) + if (gdk_rgba_is_clear (bg_color)) return; if (gsk_rounded_rect_is_rectilinear (&bg->boxes[clip])) @@ -587,7 +587,7 @@ gtk_css_style_render_background (GtkCssStyle *style, box_shadow = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BOX_SHADOW); /* This is the common default case of no background */ - if (gtk_rgba_is_clear (bg_color) && + if (gdk_rgba_is_clear (bg_color) && _gtk_css_array_value_get_n_values (background_image) == 1 && _gtk_css_image_value_get_image (_gtk_css_array_value_get_nth (background_image, 0)) == NULL && _gtk_css_shadows_value_is_none (box_shadow)) @@ -665,7 +665,7 @@ gtk_css_style_snapshot_background (GtkCssStyle *style, box_shadow = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BOX_SHADOW); /* This is the common default case of no background */ - if (gtk_rgba_is_clear (bg_color) && + if (gdk_rgba_is_clear (bg_color) && _gtk_css_array_value_get_n_values (background_image) == 1 && _gtk_css_image_value_get_image (_gtk_css_array_value_get_nth (background_image, 0)) == NULL && _gtk_css_shadows_value_is_none (box_shadow)) |