aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-31 20:24:43 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-03-31 20:24:43 +0000
commitc16921a5a1de4e89b3b64a606556cc65e8340ef4 (patch)
treed0d437c55bc6d56603b2e9650d205aad5535e183 /src
parentae9a41c6876dc103d369a3565f5a92f76f8f23d8 (diff)
parent708527d147163c45bf283622b50cd06166e935cd (diff)
downloadayatana-indicator-power-c16921a5a1de4e89b3b64a606556cc65e8340ef4.tar.gz
ayatana-indicator-power-c16921a5a1de4e89b3b64a606556cc65e8340ef4.tar.bz2
ayatana-indicator-power-c16921a5a1de4e89b3b64a606556cc65e8340ef4.zip
For the brightness slider, use the same left & right icons as ubunu-system-settings Fixes: #1289465
Approved by: Alejandro J. Cura, PS Jenkins bot
Diffstat (limited to 'src')
-rw-r--r--src/service.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index fc07619..9ac559b 100644
--- a/src/service.c
+++ b/src/service.c
@@ -530,14 +530,21 @@ create_phone_devices_section (IndicatorPowerService * self G_GNUC_UNUSED)
static GMenuItem *
create_brightness_menu_item(void)
{
+ GIcon * icon;
GMenuItem * item;
item = g_menu_item_new(NULL, "indicator.brightness");
g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.unity.slider");
g_menu_item_set_attribute(item, "min-value", "d", 0.0);
g_menu_item_set_attribute(item, "max-value", "d", 1.0);
- g_menu_item_set_attribute(item, "min-icon", "s", "torch-off" );
- g_menu_item_set_attribute(item, "max-icon", "s", "torch-on" );
+
+ icon = g_themed_icon_new("display-brightness-min");
+ g_menu_item_set_attribute_value(item, "min-icon", g_icon_serialize(icon));
+ g_clear_object(&icon);
+
+ icon = g_themed_icon_new("display-brightness-max");
+ g_menu_item_set_attribute_value(item, "max-icon", g_icon_serialize(icon));
+ g_clear_object(&icon);
return item;
}