forked from AuroraMiddleware/gtk
css: Rename -gtk-image-effect to -gtk-icon-effect
This is a property for icons, so we should name it as such.
This commit is contained in:
parent
7f93858ccc
commit
2396265523
@ -974,13 +974,13 @@ static GdkPixbuf *find_in_cache (GtkIconSet *icon_set,
|
||||
GtkTextDirection direction,
|
||||
GtkIconSize size,
|
||||
gint scale,
|
||||
GtkCssImageEffect effect);
|
||||
GtkCssIconEffect effect);
|
||||
static void add_to_cache (GtkIconSet *icon_set,
|
||||
GtkStyleContext *style_context,
|
||||
GtkTextDirection direction,
|
||||
GtkIconSize size,
|
||||
gint scale,
|
||||
GtkCssImageEffect effect,
|
||||
GtkCssIconEffect effect,
|
||||
GdkPixbuf *pixbuf);
|
||||
/* Clear icon set contents, drop references to all contained
|
||||
* GdkPixbuf objects and forget all GtkIconSources. Used to
|
||||
@ -1479,7 +1479,7 @@ gtk_icon_set_render_icon_pixbuf_for_scale (GtkIconSet *icon_set,
|
||||
GdkPixbuf *icon = NULL;
|
||||
GtkStateType state;
|
||||
GtkTextDirection direction;
|
||||
GtkCssImageEffect effect;
|
||||
GtkCssIconEffect effect;
|
||||
|
||||
g_return_val_if_fail (icon_set != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
|
||||
@ -1488,20 +1488,20 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
direction = gtk_style_context_get_direction (context);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
effect = _gtk_css_image_effect_value_get
|
||||
effect = _gtk_css_icon_effect_value_get
|
||||
(_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_GTK_IMAGE_EFFECT));
|
||||
|
||||
switch (effect)
|
||||
{
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
case GTK_CSS_IMAGE_EFFECT_NONE:
|
||||
case GTK_CSS_ICON_EFFECT_NONE:
|
||||
state = GTK_STATE_NORMAL;
|
||||
break;
|
||||
case GTK_CSS_IMAGE_EFFECT_HIGHLIGHT:
|
||||
case GTK_CSS_ICON_EFFECT_HIGHLIGHT:
|
||||
state = GTK_STATE_PRELIGHT;
|
||||
break;
|
||||
case GTK_CSS_IMAGE_EFFECT_DIM:
|
||||
case GTK_CSS_ICON_EFFECT_DIM:
|
||||
state = GTK_STATE_PRELIGHT;
|
||||
break;
|
||||
}
|
||||
@ -2443,7 +2443,7 @@ struct _CachedIcon
|
||||
GtkTextDirection direction;
|
||||
GtkIconSize size;
|
||||
gint scale;
|
||||
GtkCssImageEffect effect;
|
||||
GtkCssIconEffect effect;
|
||||
|
||||
GdkPixbuf *pixbuf;
|
||||
};
|
||||
@ -2473,7 +2473,7 @@ find_in_cache (GtkIconSet *icon_set,
|
||||
GtkTextDirection direction,
|
||||
GtkIconSize size,
|
||||
gint scale,
|
||||
GtkCssImageEffect effect)
|
||||
GtkCssIconEffect effect)
|
||||
{
|
||||
GSList *tmp_list;
|
||||
GSList *prev;
|
||||
@ -2515,7 +2515,7 @@ add_to_cache (GtkIconSet *icon_set,
|
||||
GtkTextDirection direction,
|
||||
GtkIconSize size,
|
||||
gint scale,
|
||||
GtkCssImageEffect effect,
|
||||
GtkCssIconEffect effect,
|
||||
GdkPixbuf *pixbuf)
|
||||
{
|
||||
CachedIcon *icon;
|
||||
|
@ -869,7 +869,7 @@ _gtk_css_fill_mode_value_get (const GtkCssValue *value)
|
||||
return value->value;
|
||||
}
|
||||
|
||||
/* GtkCssImageEffect */
|
||||
/* GtkCssIconEffect */
|
||||
|
||||
static const GtkCssValueClass GTK_CSS_VALUE_IMAGE_EFFECT = {
|
||||
gtk_css_value_enum_free,
|
||||
@ -880,13 +880,13 @@ static const GtkCssValueClass GTK_CSS_VALUE_IMAGE_EFFECT = {
|
||||
};
|
||||
|
||||
static GtkCssValue image_effect_values[] = {
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_IMAGE_EFFECT_NONE, "none" },
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_IMAGE_EFFECT_HIGHLIGHT, "highlight" },
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_IMAGE_EFFECT_DIM, "dim" }
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_ICON_EFFECT_NONE, "none" },
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_ICON_EFFECT_HIGHLIGHT, "highlight" },
|
||||
{ >K_CSS_VALUE_IMAGE_EFFECT, 1, GTK_CSS_ICON_EFFECT_DIM, "dim" }
|
||||
};
|
||||
|
||||
GtkCssValue *
|
||||
_gtk_css_image_effect_value_new (GtkCssImageEffect image_effect)
|
||||
_gtk_css_icon_effect_value_new (GtkCssIconEffect image_effect)
|
||||
{
|
||||
guint i;
|
||||
|
||||
@ -900,7 +900,7 @@ _gtk_css_image_effect_value_new (GtkCssImageEffect image_effect)
|
||||
}
|
||||
|
||||
GtkCssValue *
|
||||
_gtk_css_image_effect_value_try_parse (GtkCssParser *parser)
|
||||
_gtk_css_icon_effect_value_try_parse (GtkCssParser *parser)
|
||||
{
|
||||
guint i;
|
||||
|
||||
@ -915,10 +915,10 @@ _gtk_css_image_effect_value_try_parse (GtkCssParser *parser)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GtkCssImageEffect
|
||||
_gtk_css_image_effect_value_get (const GtkCssValue *value)
|
||||
GtkCssIconEffect
|
||||
_gtk_css_icon_effect_value_get (const GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (value->class == >K_CSS_VALUE_IMAGE_EFFECT, GTK_CSS_IMAGE_EFFECT_NONE);
|
||||
g_return_val_if_fail (value->class == >K_CSS_VALUE_IMAGE_EFFECT, GTK_CSS_ICON_EFFECT_NONE);
|
||||
|
||||
return value->value;
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ GtkCssValue * _gtk_css_fill_mode_value_new (GtkCssFillMode fill_m
|
||||
GtkCssValue * _gtk_css_fill_mode_value_try_parse (GtkCssParser *parser);
|
||||
GtkCssFillMode _gtk_css_fill_mode_value_get (const GtkCssValue *value);
|
||||
|
||||
GtkCssValue * _gtk_css_image_effect_value_new (GtkCssImageEffect image_effect);
|
||||
GtkCssValue * _gtk_css_image_effect_value_try_parse (GtkCssParser *parser);
|
||||
GtkCssImageEffect _gtk_css_image_effect_value_get (const GtkCssValue *value);
|
||||
GtkCssValue * _gtk_css_icon_effect_value_new (GtkCssIconEffect image_effect);
|
||||
GtkCssValue * _gtk_css_icon_effect_value_try_parse (GtkCssParser *parser);
|
||||
GtkCssIconEffect _gtk_css_icon_effect_value_get (const GtkCssValue *value);
|
||||
|
||||
GtkCssValue * _gtk_css_icon_style_value_new (GtkCssIconStyle icon_style);
|
||||
GtkCssValue * _gtk_css_icon_style_value_try_parse (GtkCssParser *parser);
|
||||
|
@ -497,7 +497,7 @@ static GtkCssValue *
|
||||
image_effect_parse (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
GtkCssValue *value = _gtk_css_image_effect_value_try_parse (parser);
|
||||
GtkCssValue *value = _gtk_css_icon_effect_value_try_parse (parser);
|
||||
|
||||
if (value == NULL)
|
||||
_gtk_css_parser_error (parser, "unknown value for property");
|
||||
@ -1720,7 +1720,7 @@ _gtk_css_style_property_init_properties (void)
|
||||
NULL,
|
||||
NULL,
|
||||
_gtk_css_number_value_new (1, GTK_CSS_NUMBER));
|
||||
gtk_css_style_property_register ("-gtk-image-effect",
|
||||
gtk_css_style_property_register ("-gtk-icon-effect",
|
||||
GTK_CSS_PROPERTY_GTK_IMAGE_EFFECT,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_INHERIT,
|
||||
@ -1728,7 +1728,7 @@ _gtk_css_style_property_init_properties (void)
|
||||
image_effect_parse,
|
||||
NULL,
|
||||
NULL,
|
||||
_gtk_css_image_effect_value_new (GTK_CSS_IMAGE_EFFECT_NONE));
|
||||
_gtk_css_icon_effect_value_new (GTK_CSS_ICON_EFFECT_NONE));
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_css_style_property_register ("engine",
|
||||
|
@ -249,10 +249,10 @@ typedef enum /*< skip >*/ {
|
||||
} GtkCssFillMode;
|
||||
|
||||
typedef enum /*< skip >*/ {
|
||||
GTK_CSS_IMAGE_EFFECT_NONE,
|
||||
GTK_CSS_IMAGE_EFFECT_HIGHLIGHT,
|
||||
GTK_CSS_IMAGE_EFFECT_DIM
|
||||
} GtkCssImageEffect;
|
||||
GTK_CSS_ICON_EFFECT_NONE,
|
||||
GTK_CSS_ICON_EFFECT_HIGHLIGHT,
|
||||
GTK_CSS_ICON_EFFECT_DIM
|
||||
} GtkCssIconEffect;
|
||||
|
||||
typedef enum /*< skip >*/ {
|
||||
GTK_CSS_ICON_STYLE_REQUESTED,
|
||||
|
@ -1078,7 +1078,7 @@ gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
cairo_t *cr;
|
||||
cairo_surface_t *surface;
|
||||
gboolean wildcarded;
|
||||
GtkCssImageEffect image_effect;
|
||||
GtkCssIconEffect image_effect;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
base_pixbuf = gtk_icon_source_get_pixbuf (source);
|
||||
@ -1112,12 +1112,12 @@ gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
if (!wildcarded)
|
||||
return scaled;
|
||||
|
||||
image_effect = _gtk_css_image_effect_value_get
|
||||
image_effect = _gtk_css_icon_effect_value_get
|
||||
(_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_GTK_IMAGE_EFFECT));
|
||||
|
||||
switch (image_effect)
|
||||
{
|
||||
case GTK_CSS_IMAGE_EFFECT_DIM:
|
||||
case GTK_CSS_ICON_EFFECT_DIM:
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
gdk_pixbuf_get_width (scaled),
|
||||
gdk_pixbuf_get_height (scaled));
|
||||
@ -1134,7 +1134,7 @@ gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
cairo_surface_destroy (surface);
|
||||
break;
|
||||
|
||||
case GTK_CSS_IMAGE_EFFECT_HIGHLIGHT:
|
||||
case GTK_CSS_ICON_EFFECT_HIGHLIGHT:
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
gdk_pixbuf_get_width (scaled),
|
||||
gdk_pixbuf_get_height (scaled));
|
||||
@ -1155,7 +1155,7 @@ gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
/* fall through */
|
||||
case GTK_CSS_IMAGE_EFFECT_NONE:
|
||||
case GTK_CSS_ICON_EFFECT_NONE:
|
||||
stated = scaled;
|
||||
break;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ $asset_suffix: if($variant=='dark', '-dark', '');
|
||||
*/
|
||||
|
||||
*:insensitive {
|
||||
-gtk-image-effect: dim;
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
.gtkstyle-fallback {
|
||||
@ -392,7 +392,7 @@ button {
|
||||
}
|
||||
&:hover {
|
||||
@include button(hover);
|
||||
-gtk-image-effect: highlight;
|
||||
-gtk-icon-effect: highlight;
|
||||
}
|
||||
&:active, &:checked {
|
||||
@include button(active);
|
||||
@ -400,7 +400,7 @@ button {
|
||||
}
|
||||
&:backdrop, &.flat:backdrop {
|
||||
@include button(backdrop);
|
||||
-gtk-image-effect: none;
|
||||
-gtk-icon-effect: none;
|
||||
&:active, &:checked {
|
||||
@include button(backdrop-active);
|
||||
}
|
||||
@ -1148,7 +1148,7 @@ headerbar {
|
||||
&:backdrop,
|
||||
&.flat:backdrop {
|
||||
@include button(backdrop, $selected_bg_color, $selected_fg_color, $_hc);
|
||||
-gtk-image-effect: none;
|
||||
-gtk-icon-effect: none;
|
||||
border-color: $selected_borders_color;
|
||||
|
||||
&:active,
|
||||
@ -3196,7 +3196,7 @@ colorswatch {
|
||||
//content view (grid/list)
|
||||
.content-view {
|
||||
background-color: darken($bg_color,7%);
|
||||
&:hover { -gtk-image-effect: highlight; }
|
||||
&:hover { -gtk-icon-effect: highlight; }
|
||||
&:backdrop { background-color: darken($bg_color,7%); }
|
||||
& rubberband { @extend rubberband; }
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
Everytime a wildcard is used a kitten dies, painfully.
|
||||
*/
|
||||
*:insensitive {
|
||||
-gtk-image-effect: dim; }
|
||||
-gtk-icon-effect: dim; }
|
||||
|
||||
.gtkstyle-fallback {
|
||||
background-color: #393f3f;
|
||||
@ -363,7 +363,7 @@ button, headerbar button.titlebutton,
|
||||
text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
|
||||
-gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1);
|
||||
-gtk-image-effect: highlight; }
|
||||
-gtk-icon-effect: highlight; }
|
||||
button:active, headerbar button.titlebutton:active,
|
||||
.titlebar button.titlebutton:active, button:checked, headerbar button.titlebutton:checked,
|
||||
.titlebar button.titlebutton:checked {
|
||||
@ -384,7 +384,7 @@ button, headerbar button.titlebutton,
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0);
|
||||
-gtk-image-effect: none; }
|
||||
-gtk-icon-effect: none; }
|
||||
button:backdrop:active, button:backdrop:checked, button.flat:backdrop:active, button.sidebar-button:backdrop:active, headerbar button.titlebutton:backdrop:active,
|
||||
.titlebar button.titlebutton:backdrop:active, button.flat:backdrop:checked, button.sidebar-button:backdrop:checked, headerbar button.titlebutton:backdrop:checked,
|
||||
.titlebar button.titlebutton:backdrop:checked {
|
||||
@ -1643,7 +1643,7 @@ headerbar {
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(43, 100, 160, 0);
|
||||
-gtk-image-effect: none;
|
||||
-gtk-icon-effect: none;
|
||||
border-color: #0f2b48; }
|
||||
.titlebar.selection-mode button:backdrop:active, .titlebar.selection-mode button:backdrop:checked, .titlebar.selection-mode button.flat:backdrop:active, .titlebar.selection-mode button.sidebar-button:backdrop:active,
|
||||
.titlebar.selection-mode button.titlebutton:backdrop:active, .titlebar.selection-mode button.flat:backdrop:checked, .titlebar.selection-mode button.sidebar-button:backdrop:checked,
|
||||
@ -4374,7 +4374,7 @@ colorswatch {
|
||||
.content-view {
|
||||
background-color: #282c2c; }
|
||||
.content-view:hover {
|
||||
-gtk-image-effect: highlight; }
|
||||
-gtk-icon-effect: highlight; }
|
||||
.content-view:backdrop {
|
||||
background-color: #282c2c; }
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
Everytime a wildcard is used a kitten dies, painfully.
|
||||
*/
|
||||
*:insensitive {
|
||||
-gtk-image-effect: dim; }
|
||||
-gtk-icon-effect: dim; }
|
||||
|
||||
.gtkstyle-fallback {
|
||||
background-color: #ededed;
|
||||
@ -363,7 +363,7 @@ button, headerbar button.titlebutton,
|
||||
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
-gtk-icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
|
||||
box-shadow: inset 0 1px white, 0 1px white;
|
||||
-gtk-image-effect: highlight; }
|
||||
-gtk-icon-effect: highlight; }
|
||||
button:active, headerbar button.titlebutton:active,
|
||||
.titlebar button.titlebutton:active, button:checked, headerbar button.titlebutton:checked,
|
||||
.titlebar button.titlebutton:checked {
|
||||
@ -384,7 +384,7 @@ button, headerbar button.titlebutton,
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
|
||||
-gtk-image-effect: none; }
|
||||
-gtk-icon-effect: none; }
|
||||
button:backdrop:active, button:backdrop:checked, button.flat:backdrop:active, button.sidebar-button:backdrop:active, headerbar button.titlebutton:backdrop:active,
|
||||
.titlebar button.titlebutton:backdrop:active, button.flat:backdrop:checked, button.sidebar-button:backdrop:checked, headerbar button.titlebutton:backdrop:checked,
|
||||
.titlebar button.titlebutton:backdrop:checked {
|
||||
@ -1643,7 +1643,7 @@ headerbar {
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(165, 200, 236, 0);
|
||||
-gtk-image-effect: none;
|
||||
-gtk-icon-effect: none;
|
||||
border-color: #184472; }
|
||||
.titlebar.selection-mode button:backdrop:active, .titlebar.selection-mode button:backdrop:checked, .titlebar.selection-mode button.flat:backdrop:active, .titlebar.selection-mode button.sidebar-button:backdrop:active,
|
||||
.titlebar.selection-mode button.titlebutton:backdrop:active, .titlebar.selection-mode button.flat:backdrop:checked, .titlebar.selection-mode button.sidebar-button:backdrop:checked,
|
||||
@ -4546,7 +4546,7 @@ colorswatch {
|
||||
.content-view {
|
||||
background-color: #dbdbdb; }
|
||||
.content-view:hover {
|
||||
-gtk-image-effect: highlight; }
|
||||
-gtk-icon-effect: highlight; }
|
||||
.content-view:backdrop {
|
||||
background-color: #dbdbdb; }
|
||||
|
||||
|
@ -72,7 +72,7 @@ $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||
|
||||
|
||||
*:insensitive {
|
||||
-gtk-image-effect: dim;
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
.gtkstyle-fallback {
|
||||
@ -349,7 +349,7 @@ button {
|
||||
@include button(normal);
|
||||
&:hover, &.flat:hover {
|
||||
@include button(hover);
|
||||
-gtk-image-effect: highlight;
|
||||
-gtk-icon-effect: highlight;
|
||||
}
|
||||
&:active, &.flat:active,
|
||||
&:checked, &.flat:checked {
|
||||
|
@ -73,7 +73,7 @@
|
||||
Everytime a wildcard is used a kitten dies, painfully.
|
||||
*/
|
||||
*:insensitive {
|
||||
-gtk-image-effect: dim; }
|
||||
-gtk-icon-effect: dim; }
|
||||
|
||||
.gtkstyle-fallback {
|
||||
background-color: #fff;
|
||||
@ -373,7 +373,7 @@ button {
|
||||
background-color: #fff;
|
||||
border-color: gray;
|
||||
background-image: none;
|
||||
-gtk-image-effect: highlight; }
|
||||
-gtk-icon-effect: highlight; }
|
||||
button:active, button.flat:active, button.sidebar-button:active, button:checked, button.flat:checked, button.sidebar-button:checked {
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
|
@ -1,11 +1,11 @@
|
||||
GtkBox > :nth-child(1) {
|
||||
-gtk-image-effect: none;
|
||||
-gtk-icon-effect: none;
|
||||
}
|
||||
|
||||
GtkBox > :nth-child(2) {
|
||||
-gtk-image-effect: highlight;
|
||||
-gtk-icon-effect: highlight;
|
||||
}
|
||||
|
||||
GtkBox > :nth-child(3) {
|
||||
-gtk-image-effect: dim;
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user