summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorWoochan Lee <wc0917.lee@samsung.com>2016-11-28 10:58:57 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-11-28 11:35:27 -0800
commit6c04755a922d396356a561b85e010105e6ff61ae (patch)
tree2d681d32c258d671485a99cd069c442bc555b9e4 /data
parent05246782dc9c94eeb24bb29e1489ced512259cca (diff)
elm/calendar: apply focus UI feature.
Summary: elm_calendar is not subject to current automated focus policies due to internal implementation issues. (Each date in the calendar is an edje part. ) For the above reasons, I have implemented the focus policy support manually. Test Plan: elementary_test - calendar sample. Reviewers: bu5hm4n, woohyun Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4421 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/elm/calendar.edc62
1 files changed, 62 insertions, 0 deletions
diff --git a/data/elementary/themes/edc/elm/calendar.edc b/data/elementary/themes/edc/elm/calendar.edc
index 662bd51..8dfffc1 100644
--- a/data/elementary/themes/edc/elm/calendar.edc
+++ b/data/elementary/themes/edc/elm/calendar.edc
@@ -200,6 +200,21 @@
200 visible: 1; \ 200 visible: 1; \
201 } \ 201 } \
202 } \ 202 } \
203 part { name: "cit_"#_pos".glow"; mouse_events: 0; \
204 description { state: "default" 0.0; \
205 rel1.to: "cit_"#_pos".rect"; \
206 rel2.to: "cit_"#_pos".rect"; \
207 image.normal: "box_glow.png"; \
208 image.border: 12 12 12 12; \
209 image.middle: 0; \
210 fill.smooth: 0; \
211 visible: 0; \
212 } \
213 description { state: "focused" 0.0; \
214 inherit: "default" 0.0; \
215 visible: 1; \
216 } \
217 } \
203 part { name: "cit_"#_pos".text"; type: TEXTBLOCK; mouse_events: 0; \ 218 part { name: "cit_"#_pos".text"; type: TEXTBLOCK; mouse_events: 0; \
204 scale: 1; \ 219 scale: 1; \
205 description { state: "default" 0.0; \ 220 description { state: "default" 0.0; \
@@ -280,6 +295,26 @@
280 target: "cit_"#_pos".selected"; \ 295 target: "cit_"#_pos".selected"; \
281 } \ 296 } \
282 program { \ 297 program { \
298 name: "cit_"#_pos".focus_highlighted"; \
299 signal: "cit_"#_pos",focused"; \
300 source: "elm"; \
301 script { \
302 set_int(item_focus_enabled, 1); \
303 set_int(last_focused_item, _pos); \
304 if (get_int(win_focus_enabled) == 1) \
305 set_state(PART:"cit_"#_pos".glow", "focused", 0.0); \
306 } \
307 } \
308 program { \
309 name: "cit_"#_pos".focus_unhighlighed"; \
310 signal: "cit_"#_pos",unfocused"; \
311 source: "elm"; \
312 script { \
313 set_int(item_focus_enabled, 0); \
314 set_state(PART:"cit_"#_pos".glow", "default", 0.0); \
315 } \
316 } \
317 program { \
283 name: "cit_"#_pos".is_today"; \ 318 name: "cit_"#_pos".is_today"; \
284 signal: "cit_"#_pos",today"; \ 319 signal: "cit_"#_pos",today"; \
285 source: "elm"; \ 320 source: "elm"; \
@@ -413,9 +448,14 @@ group { name: "elm/calendar/base/default";
413 images.image: "sym_right_glow_normal.png" COMP; 448 images.image: "sym_right_glow_normal.png" COMP;
414 images.image: "icon_border_remember.png" COMP; 449 images.image: "icon_border_remember.png" COMP;
415 images.image: "outline_glow.png" COMP; 450 images.image: "outline_glow.png" COMP;
451 images.image: "box_glow.png" COMP;
416 images.image: "diagonal_stripes.png" COMP; 452 images.image: "diagonal_stripes.png" COMP;
453 data.item: "focus_highlight" "on";
417 script { 454 script {
418 public rtl; 455 public rtl;
456 public win_focus_enabled;
457 public item_focus_enabled;
458 public last_focused_item;
419 } 459 }
420 styles { 460 styles {
421 CIT_STYLES 461 CIT_STYLES
@@ -493,6 +533,28 @@ group { name: "elm/calendar/base/default";
493 CIT(21) CIT(22) CIT(23) CIT(24) CIT(25) CIT(26) CIT(27) 533 CIT(21) CIT(22) CIT(23) CIT(24) CIT(25) CIT(26) CIT(27)
494 CIT(28) CIT(29) CIT(30) CIT(31) CIT(32) CIT(33) CIT(34) 534 CIT(28) CIT(29) CIT(30) CIT(31) CIT(32) CIT(33) CIT(34)
495 CIT(35) CIT(36) CIT(37) CIT(38) CIT(39) CIT(40) CIT(41) 535 CIT(35) CIT(36) CIT(37) CIT(38) CIT(39) CIT(40) CIT(41)
536
537 }
538 programs {
539 program {
540 signal: "elm,action,focus_highlight,show";
541 source: "elm";
542 script {
543 set_int(win_focus_enabled, 1);
544 if (get_int(item_focus_enabled) == 1) {
545 new value[32];
546 snprintf(value, 32, "cit_%d,focused", get_int(last_focused_item));
547 emit(value, "elm");
548 }
549 }
550 }
551 program {
552 signal: "elm,action,focus_highlight,hide";
553 source: "elm";
554 script {
555 set_int(win_focus_enabled, 0);
556 }
557 }
496 } 558 }
497} 559}
498 560