css: Add "-gtk-icon-source: builtin"

... and make it the default. This takes over the meaning from "none" for
this property in that it draws the fallback builtin image.
"none" now literally means no image will be drawn.
This commit is contained in:
Benjamin Otte
2014-10-21 05:52:05 +02:00
parent 7eb3b6c71f
commit 8abc6e06b2
7 changed files with 210 additions and 6 deletions

View File

@ -26,6 +26,7 @@
#include "gtkcsscornervalueprivate.h"
#include "gtkcssenginevalueprivate.h"
#include "gtkcssenumvalueprivate.h"
#include "gtkcssimagebuiltinprivate.h"
#include "gtkcssimagevalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
@ -51,6 +52,9 @@ render_icon_image (GtkStyleContext *context,
image = _gtk_css_image_value_get_image (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_ICON_SOURCE));
if (image == NULL)
return TRUE;
if (GTK_IS_CSS_IMAGE_BUILTIN (image))
return FALSE;
shadows = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_ICON_SHADOW);