summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-09-14 14:34:47 +0100
committerAlastair Poole <netstar@gmail.com>2020-09-14 14:35:17 +0100
commit97a92a2ed7df9cf81223ddb3a7fa548b16441885 (patch)
treefaf834aad33225d0675d58847e733c9080398085
parent12afd7b6c04394bd81801d8577612271d4047548 (diff)
btn: use a rect for min sizing..v0.5.5
-rw-r--r--src/bin/ui/ui.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bin/ui/ui.c b/src/bin/ui/ui.c
index d410bb5..6bc6d82 100644
--- a/src/bin/ui/ui.c
+++ b/src/bin/ui/ui.c
@@ -1121,12 +1121,18 @@ _main_menu_dismissed_cb(void *data, Evas_Object *obj EINA_UNUSED,
1121static Evas_Object * 1121static Evas_Object *
1122_btn_create(Evas_Object *parent, const char *icon, const char *text, void *cb, void *data) 1122_btn_create(Evas_Object *parent, const char *icon, const char *text, void *cb, void *data)
1123{ 1123{
1124 Evas_Object *btn, *ic; 1124 Evas_Object *ot, *or, *btn, *ic;
1125
1126 ot = elm_table_add(parent);
1127 evas_object_show(ot);
1128
1129 or = evas_object_rectangle_add(evas_object_evas_get(parent));
1130 evas_object_size_hint_min_set(or, 24 * elm_config_scale_get(), 24 * elm_config_scale_get());
1131 elm_table_pack(ot, or, 0, 0, 1, 1);
1125 1132
1126 btn = elm_button_add(parent); 1133 btn = elm_button_add(parent);
1127 evas_object_size_hint_weight_set(btn, 0, EXPAND); 1134 evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
1128 evas_object_size_hint_align_set(btn, FILL, FILL); 1135 evas_object_size_hint_align_set(btn, FILL, FILL);
1129 evas_object_size_hint_min_set(btn, 24 * elm_config_scale_get(), 24 * elm_config_scale_get());
1130 evas_object_show(btn); 1136 evas_object_show(btn);
1131 1137
1132 ic = elm_icon_add(btn); 1138 ic = elm_icon_add(btn);
@@ -1137,7 +1143,9 @@ _btn_create(Evas_Object *parent, const char *icon, const char *text, void *cb, v
1137 elm_object_tooltip_text_set(btn, text); 1143 elm_object_tooltip_text_set(btn, text);
1138 evas_object_smart_callback_add(btn, "clicked", cb, data); 1144 evas_object_smart_callback_add(btn, "clicked", cb, data);
1139 1145
1140 return btn; 1146 elm_table_pack(ot, btn, 0, 0, 1, 1);
1147
1148 return ot;
1141} 1149}
1142 1150
1143static void 1151static void