css: Add support for -gtk-icontheme("icon-name")

This allows using icons from the icontheme as images in CSS. The
reasoning is that this allows to give the image control about how it's
scaled (by using the icon theme's scaling method. So we can get crisp
images at different resolutions.
This commit is contained in:
Benjamin Otte
2014-05-01 19:50:22 +02:00
parent f6af96723c
commit 633ec8184d
4 changed files with 229 additions and 0 deletions

View File

@ -26,6 +26,7 @@
/* for the types only */
#include "gtk/gtkcssimagecrossfadeprivate.h"
#include "gtk/gtkcssimagegradientprivate.h"
#include "gtk/gtkcssimageiconthemeprivate.h"
#include "gtk/gtkcssimagelinearprivate.h"
#include "gtk/gtkcssimageurlprivate.h"
#include "gtk/gtkcssimagescaledprivate.h"
@ -423,6 +424,7 @@ gtk_css_image_get_parser_type (GtkCssParser *parser)
} image_types[] = {
{ "url", _gtk_css_image_url_get_type },
{ "-gtk-gradient", _gtk_css_image_gradient_get_type },
{ "-gtk-icontheme", _gtk_css_image_icon_theme_get_type },
{ "-gtk-scaled", _gtk_css_image_scaled_get_type },
{ "-gtk-win32-theme-part", _gtk_css_image_win32_get_type },
{ "linear-gradient", _gtk_css_image_linear_get_type },