summaryrefslogtreecommitdiff
path: root/src/notifications/noti_section.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notifications/noti_section.c')
-rwxr-xr-xsrc/notifications/noti_section.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/notifications/noti_section.c b/src/notifications/noti_section.c
index d45c026..4b8e125 100755
--- a/src/notifications/noti_section.c
+++ b/src/notifications/noti_section.c
@@ -196,12 +196,30 @@ HAPI void quickpanel_noti_section_create(Evas_Object *parent)
elm_image_file_set(icon, buffer, NULL);
evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(40));
evas_object_size_hint_max_set(icon, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(40));
- evas_object_size_hint_align_set(icon, 1.0, 0.5);
+ evas_object_size_hint_align_set(icon, 0.5, 0.5);
elm_object_part_content_set(vc_button, "icon", icon);
elm_object_part_content_set(section, "voice_control_swallow", vc_button);
evas_object_show(vc_button);
+
+ Evas_Object* power_button = elm_button_add(section);
+ elm_object_style_set(power_button, "focus");
+ evas_object_size_hint_weight_set(power_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ snprintf(buffer, 1024, "%s%s%s", path, "images_icon/", "icon_power.png");
+ Evas_Object* power_icon = elm_image_add(power_button);
+ elm_image_file_set(power_icon, buffer, NULL);
+ evas_object_size_hint_min_set(power_icon, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(40));
+ evas_object_size_hint_max_set(power_icon, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(40));
+ evas_object_size_hint_align_set(power_icon, 1.0, 0.5);
+
+ elm_object_part_content_set(power_button, "icon", power_icon);
+
+ elm_object_part_content_set(section, "power_button_swallow", power_button);
+ evas_object_smart_callback_add(power_button, "clicked", quickpanel_power_button_clicked, NULL);
+ evas_object_show(power_button);
+
free(path);