aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-02-21 19:56:21 +0000
committerTarmac <Unknown>2013-02-21 19:56:21 +0000
commit282083835d37d1382823c6c39beb69c3cb054879 (patch)
treed78bd852e9db5db9a97830747a07a72b24367e7e
parent4619f0c59029cf2b263a3ed40052bc4eff67052b (diff)
parent83566829d9c2ba7153d7afd7c2aa7564fd4fd23b (diff)
downloadayatana-indicator-sound-282083835d37d1382823c6c39beb69c3cb054879.tar.gz
ayatana-indicator-sound-282083835d37d1382823c6c39beb69c3cb054879.tar.bz2
ayatana-indicator-sound-282083835d37d1382823c6c39beb69c3cb054879.zip
transport-widget: use menu's style for the buttons
The menuitem's style can't be used anymore due to a recent change in light-themes (lp #1130183). Menuitems now have a transparent background, which confuses GtkStyle. This is a quick workaround. Going forward, we should use the more modern styling features of gtk. Approved by Charles Kerr, PS Jenkins bot.
-rw-r--r--src/transport-widget.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 0931e1d..ebe8282 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -1301,7 +1301,16 @@ draw (GtkWidget* button, cairo_t *cr)
color_play_outer[2], color_play_outer_prelight[2],
color_button[4], color_button_shadow, color_inner[2], color_inner_compressed[2];
- style = gtk_widget_get_style (button);
+ /* Use the menu's style instead of that of the menuitem ('button' is a
+ * menuitem that is packed in a menu directly). The menuitem's style
+ * can't be used due to a change in light-themes (lp #1130183).
+ * Menuitems now have a transparent background, which confuses
+ * GtkStyle.
+ *
+ * This is a workaround until this code gets refactored to use
+ * GtkStyleContext.
+ */
+ style = gtk_widget_get_style (gtk_widget_get_parent (button));
bg_color.r = style->bg[0].red/65535.0;
bg_color.g = style->bg[0].green/65535.0;