summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-31 11:29:33 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-31 11:29:33 +0100
commitb90a8a1819fb7a5ed5485364ea4a21e21c7c9321 (patch)
tree807689a27b00354258f2a8530904c274232fda63 /src
parent769066f606e6459192d0b6ed5069e0807cc7ae81 (diff)
elm theme - add overlay and blank styles for buttons
useful for things like entice
Diffstat (limited to 'src')
-rw-r--r--src/bin/elementary/test_button.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/bin/elementary/test_button.c b/src/bin/elementary/test_button.c
index b7e4288d7c..9ebe0a6c42 100644
--- a/src/bin/elementary/test_button.c
+++ b/src/bin/elementary/test_button.c
@@ -147,6 +147,72 @@ test_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
147 elm_box_pack_end(bx, bt); 147 elm_box_pack_end(bx, bt);
148 evas_object_show(bt); 148 evas_object_show(bt);
149 149
150 bt = elm_button_add(win);
151 elm_object_style_set(bt, "overlay");
152 elm_object_text_set(bt, "Overlay style");
153 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)77);
154 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)77);
155 elm_box_pack_end(bx, bt);
156 evas_object_show(bt);
157
158 ic = elm_icon_add(win);
159 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
160 elm_image_file_set(ic, buf, NULL);
161 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
162 bt = elm_button_add(win);
163 elm_object_style_set(bt, "overlay");
164 elm_object_part_content_set(bt, "icon", ic);
165 elm_object_text_set(bt, "Overlay style");
166 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)77);
167 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)77);
168 elm_box_pack_end(bx, bt);
169 evas_object_show(bt);
170
171 ic = elm_icon_add(win);
172 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
173 elm_image_file_set(ic, buf, NULL);
174 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
175 bt = elm_button_add(win);
176 elm_object_style_set(bt, "overlay");
177 elm_object_part_content_set(bt, "icon", ic);
178 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)77);
179 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)77);
180 elm_box_pack_end(bx, bt);
181 evas_object_show(bt);
182
183 bt = elm_button_add(win);
184 elm_object_style_set(bt, "blank");
185 elm_object_text_set(bt, "Blank style");
186 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)88);
187 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)88);
188 elm_box_pack_end(bx, bt);
189 evas_object_show(bt);
190
191 ic = elm_icon_add(win);
192 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
193 elm_image_file_set(ic, buf, NULL);
194 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
195 bt = elm_button_add(win);
196 elm_object_style_set(bt, "blank");
197 elm_object_part_content_set(bt, "icon", ic);
198 elm_object_text_set(bt, "Blank style");
199 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)88);
200 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)88);
201 elm_box_pack_end(bx, bt);
202 evas_object_show(bt);
203
204 ic = elm_icon_add(win);
205 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
206 elm_image_file_set(ic, buf, NULL);
207 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
208 bt = elm_button_add(win);
209 elm_object_style_set(bt, "blank");
210 elm_object_part_content_set(bt, "icon", ic);
211 evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)88);
212 evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)88);
213 elm_box_pack_end(bx, bt);
214 evas_object_show(bt);
215
150 ic = elm_icon_add(win); 216 ic = elm_icon_add(win);
151 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); 217 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
152 elm_image_file_set(ic, buf, NULL); 218 elm_image_file_set(ic, buf, NULL);