[gnome-themes-standard] engine: remove hack to override color for arrows in GtkMenuItems
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] engine: remove hack to override color for arrows in GtkMenuItems
- Date: Mon, 5 Dec 2011 14:47:33 +0000 (UTC)
commit 973f5ccb6d78b47528caaf866cde0a5627f6f67b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Dec 2 11:58:50 2011 -0500
engine: remove hack to override color for arrows in GtkMenuItems
GTK+ now properly sets a style class when rendering the arrow, thus we
can remove the override from the C engine.
src/adwaita_engine.c | 21 ---------------------
themes/Adwaita/gtk-3.0/gtk-widgets.css | 5 ++++-
2 files changed, 4 insertions(+), 22 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 272d124..43de79b 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -101,22 +101,6 @@ adwaita_engine_render_arrow (GtkThemingEngine *engine,
state = gtk_theming_engine_get_state (engine);
gtk_theming_engine_get_color (engine, state, &color);
-
- if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_MENUITEM) &&
- !(state & GTK_STATE_FLAG_INSENSITIVE) && !(state & GTK_STATE_FLAG_PRELIGHT))
- {
- GdkRGBA *arrow_color;
-
- gtk_theming_engine_get (engine, state,
- "-adwaita-menuitem-arrow-color", &arrow_color,
- NULL);
-
- if (arrow_color != NULL)
- color = *arrow_color;
-
- gdk_rgba_free (arrow_color);
- }
-
gdk_cairo_set_source_rgba (cr, &color);
cairo_stroke (cr);
@@ -790,11 +774,6 @@ adwaita_engine_class_init (AdwaitaEngineClass *klass)
"Focus border uses dashes",
FALSE, 0));
gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
- g_param_spec_boxed ("menuitem-arrow-color",
- "Menuitem arrow color",
- "Menuitem arrow color",
- GDK_TYPE_RGBA, 0));
- gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
g_param_spec_boxed ("progressbar-pattern",
"Progressbar pattern",
"Progressbar pattern",
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 4b0a111..1dc400d 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -1051,10 +1051,13 @@ GtkTreeMenu .menuitem * {
.menuitem {
-GtkMenuItem-arrow-scaling: 0.4;
- -adwaita-menuitem-arrow-color: @menu_controls_color;
padding: 4;
}
+.menuitem.arrow {
+ color: @menu_controls_color;
+}
+
.menuitem:active,
.menuitem *:active,
.menuitem:prelight,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]