raster pushed a commit to branch master.
commit 4279bdb0a37ffe3d7359176a91850848dc4d0b0f
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Wed Aug 7 16:15:28 2013 +0900
clean up calendar theme - diagonal strips on selected day, less padding,
correct font sizing, etc. etc.
---
edje/edc/elm/calendar.edc | 278 ++++++++++++++++++++--------------------------
1 file changed, 118 insertions(+), 160 deletions(-)
diff --git a/edje/edc/elm/calendar.edc b/edje/edc/elm/calendar.edc
index 3db72a5..406cafa 100644
--- a/edje/edc/elm/calendar.edc
+++ b/edje/edc/elm/calendar.edc
@@ -10,11 +10,10 @@
}\
#define CAL_SPIN(_sufix, _signal_sufix, _text, _relative)\
- part { name: "left_bt"#_sufix;\
- type: RECT;\
- mouse_events: 1;\
+ part { name: "left_bt"#_sufix; type: RECT;\
scale: 1;\
description { state: "default" 0.0;\
+ fixed: 1 1;\
rel1 { to: #_relative;\
offset: 2 2;\
}\
@@ -24,13 +23,10 @@
align: 0.0 0.5;\
min: 24 24;\
max: 24 24;\
- fixed: 1 1;\
color: 0 0 0 0;\
}\
}\
- part { name: "left_bt"#_sufix"_over";\
- mouse_events: 1;\
- repeat_events: 1;\
+ part { name: "left_bt"#_sufix"_over"; repeat_events: 1;\
scale: 1;\
description { state: "default" 0.0;\
min: 15 15;\
@@ -53,11 +49,10 @@
image.normal: "sym_right_glow_normal.png";\
}\
}\
- part { name: "right_bt"#_sufix;\
- type: RECT;\
- mouse_events: 1;\
+ part { name: "right_bt"#_sufix; type: RECT;\
scale: 1;\
description { state: "default" 0.0;\
+ fixed: 1 1;\
rel1 { to: #_relative;\
offset: -27 2;\
}\
@@ -67,18 +62,14 @@
align: 1.0 0.5;\
min: 24 24;\
max: 24 24;\
- fixed: 1 1;\
color: 0 0 0 0;\
}\
}\
- part { name: "right_bt"#_sufix"_over";\
- mouse_events: 1;\
- repeat_events: 1;\
+ part { name: "right_bt"#_sufix"_over"; repeat_events: 1;\
scale: 1;\
description { state: "default" 0.0;\
min: 15 15;\
max: 15 15;\
- align: 0.5 0.5;\
rel1.to: "right_bt"#_sufix;\
rel2.to: "right_bt"#_sufix;\
image.normal: "sym_right_light_normal.png";\
@@ -96,14 +87,11 @@
image.normal: "sym_left_glow_normal.png";\
}\
}\
- part { name: #_text;\
- type: TEXT;\
- mouse_events: 0;\
- scale: 1;\
+ part { name: #_text; type: TEXT; mouse_events: 0;\
effect: SHADOW BOTTOM; \
+ scale: 1;\
description { state: "default" 0.0;\
fixed: 1 1;\
- align: 0.5 0.5;\
rel1 { relative: 1.0 0.0;\
to: "left_bt"#_sufix;\
}\
@@ -111,29 +99,22 @@
to: "right_bt"#_sufix;\
}\
color: FN_COL_DEFAULT;\
- text {\
- font: "Sans:style=Bold";\
- size: 11;\
+ text { font: FNBD; size: 10;\
min: 1 1;\
- align: 0.5 0.5;\
}\
}\
}\
programs {\
- program { name: "dec_"#_sufix"_start";\
- signal: "mouse,down,1";\
- source: "left_bt"#_sufix;\
+ program {\
+ signal: "mouse,down,1"; source: "left_bt"#_sufix;\
action: SIGNAL_EMIT "elm,action,decrement,start"#_signal_sufix "";\
}\
- program { name: "dec_"#_sufix"_stop";\
- signal: "mouse,up,1";\
- source: "left_bt"#_sufix;\
+ program {\
+ signal: "mouse,up,1"; source: "left_bt"#_sufix;\
action: SIGNAL_EMIT "elm,action,stop"#_signal_sufix ""; \
}\
- program {\
- name: "left_bt"#_sufix"_click";\
- signal: "mouse,down,1";\
- source: "left_bt"#_sufix;\
+ program { name: "left_bt"#_sufix"_click";\
+ signal: "mouse,down,1"; source: "left_bt"#_sufix;\
script {\
if (get_int(rtl) == 1)\
set_state(PART:"left_bt"#_sufix"_over", "clicked_rtl", 0.0);\
@@ -141,10 +122,8 @@
set_state(PART:"left_bt"#_sufix"_over", "clicked", 0.0);\
}\
}\
- program {\
- name: "left_bt"#_sufix"_unclick";\
- signal: "mouse,up,1";\
- source: "left_bt"#_sufix;\
+ program { name: "left_bt"#_sufix"_unclick";\
+ signal: "mouse,up,1"; source: "left_bt"#_sufix;\
script {\
if (get_int(rtl) == 1)\
set_state(PART:"left_bt"#_sufix"_over", "rtl", 0.0);\
@@ -152,20 +131,16 @@
set_state(PART:"left_bt"#_sufix"_over", "default", 0.0);\
}\
}\
- program { name: "inc_"#_sufix"_start";\
- signal: "mouse,down,1";\
- source: "right_bt"#_sufix;\
+ program {\
+ signal: "mouse,down,1"; source: "right_bt"#_sufix;\
action: SIGNAL_EMIT "elm,action,increment,start"#_signal_sufix "";\
}\
- program { name: "inc_"#_sufix"_stop";\
- signal: "mouse,up,1";\
- source: "right_bt"#_sufix;\
+ program {\
+ signal: "mouse,up,1"; source: "right_bt"#_sufix;\
action: SIGNAL_EMIT "elm,action,stop"#_signal_sufix ""; \
}\
- program {\
- name: "right_bt"#_sufix"_click";\
- signal: "mouse,down,1";\
- source: "right_bt"#_sufix;\
+ program { name: "right_bt"#_sufix"_click";\
+ signal: "mouse,down,1"; source: "right_bt"#_sufix;\
script {\
if (get_int(rtl) == 1)\
set_state(PART:"right_bt"#_sufix"_over", "clicked_rtl", 0.0);\
@@ -173,10 +148,8 @@
set_state(PART:"right_bt"#_sufix"_over", "clicked", 0.0);\
}\
}\
- program {\
- name: "right_bt"#_sufix"_unclick";\
- signal: "mouse,up,1";\
- source: "right_bt"#_sufix;\
+ program { name: "right_bt"#_sufix"_unclick";\
+ signal: "mouse,up,1"; source: "right_bt"#_sufix;\
script {\
if (get_int(rtl) == 1)\
set_state(PART:"right_bt"#_sufix"_over", "rtl", 0.0);\
@@ -184,18 +157,16 @@
set_state(PART:"right_bt"#_sufix"_over", "default", 0.0);\
}\
}\
- program { name: "to_rtl_"#_sufix;\
- signal: "edje,state,rtl";\
- source: "edje";\
+ program { name: "rtl"#_sufix;\
+ signal: "edje,state,rtl"; source: "edje";\
script {\
set_int(rtl, 1);\
set_state(PART:"left_bt"#_sufix"_over", "rtl", 0.0);\
set_state(PART:"right_bt"#_sufix"_over", "rtl", 0.0);\
}\
}\
- program { name: "to_ltr_"#_sufix;\
- signal: "edje,state,ltr";\
- source: "edje";\
+ program { name: "ltr"#_sufix;\
+ signal: "edje,state,ltr"; source: "edje";\
script {\
set_int(rtl, 0);\
set_state(PART:"left_bt"#_sufix"_over", "default", 0.0);\
@@ -205,43 +176,33 @@
}
#define CH(_pos) \
- part { name: "ch_"#_pos".base"; \
- type: RECT; \
+ part { name: "ch_"#_pos".base"; type: SPACER; \
description { state: "default" 0.0; \
rel1 { \
- relative: (_pos % 7 * 7 / 8 / 6) 0; \
+ relative: (_pos % 7 / 7) 0; \
to: "header"; \
} \
rel2 { \
- relative: (_pos % 7 * 7 / 8 / 6 + 1 / 8) 1; \
+ relative: (_pos % 7 / 7 + 1 / 7) 1; \
to: "header"; \
} \
- color: 0 0 0 0; \
- visible: 0; \
} \
} \
- part { name: "ch_"#_pos".text"; \
- type: TEXT; \
+ part { name: "ch_"#_pos".text"; type: TEXT; mouse_events: 0; \
effect: SHADOW BOTTOM; \
- mouse_events: 0; \
scale: 1; \
clip_to: "ch_"#_pos".clipper"; \
- description { \
- state: "default" 0.0; \
+ description { state: "default" 0.0; \
rel1.to: "ch_"#_pos".base"; \
rel2.to: "ch_"#_pos".base"; \
color: 21 21 21 255;\
color3: 255 255 255 25;\
- text { \
- font: FN; \
- size: 10; \
+ text { font: FN; size: 8; \
min: 1 1; \
- align: 0.5 0.5; \
} \
} \
} \
- part { name: "ch_"#_pos".clipper"; \
- type: RECT; \
+ part { name: "ch_"#_pos".clipper"; type: RECT; \
description { state: "default" 0.0; \
rel1.to: "ch_"#_pos".base"; \
rel2.to: "ch_"#_pos".base"; \
@@ -249,86 +210,91 @@
}
#define CIT(_pos) \
- part { name: "cit_"#_pos".rect"; \
- type: RECT; \
+ part { name: "cit_"#_pos".rect"; type: SPACER; \
description { state: "default" 0.0; \
rel1 { \
- relative: (_pos % 7 * 7 / 8 / 6) \
- (_pos / 8 / 5 - _pos % 7 / 8 / 5); \
+ relative: (_pos % 7 / 7) \
+ (_pos / 7 / 6 - _pos % 7 / 7 / 6); \
to: "base"; \
} \
rel2 { \
- relative: (_pos % 7 * 7 / 8 / 6 + 1 / 8) \
- (_pos / 8 / 5 - _pos % 7 / 8 / 5 + 1 / 8); \
+ relative: (_pos % 7 / 7 + 1 / 7) \
+ (_pos / 7 / 6 + 1 / 6 - _pos % 7 / 7 / 6); \
to: "base"; \
} \
- color: 0 0 0 0; \
- visible: 0; \
} \
} \
- part { \
- name: "cit_"#_pos".event"; \
- type: RECT; \
- repeat_events: 1; \
- description { \
+ part { name: "cit_"#_pos".event"; type: RECT; repeat_events: 1; \
+ description { state: "default" 0.0; \
rel1.to: "cit_"#_pos".rect"; \
rel2.to: "cit_"#_pos".rect"; \
- state: "default" 0.0; \
color: 0 0 0 0; \
} \
} \
- part { \
- name: "cit_"#_pos".selected"; \
- mouse_events: 0; \
- description { \
- state: "default" 0.0; \
+ part { name: "cit_"#_pos".pat"; mouse_events: 0; \
+ description { state: "default" 0.0; \
+ rel1.to: "cit_"#_pos".selected"; \
+ rel1.offset: 1 1; \
+ rel2.to: "cit_"#_pos".selected"; \
+ rel2.offset: -2 -2; \
+ image.normal: "diagonal_stripes.png"; \
+ color: 255 255 255 25; \
+ TILED_PATTERN(240, 240) \
+ visible: 0; \
+ } \
+ description { state: "selected" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "cit_"#_pos".selected"; mouse_events: 0; \
+ description { state: "default" 0.0; \
rel1.to: "cit_"#_pos".rect"; \
rel2.to: "cit_"#_pos".rect"; \
+ image.normal: "outline_glow.png"; \
+ image.border: 4 4 4 4; \
visible: 0; \
+ } \
+ description { state: "selected" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "cit_"#_pos".selected2"; mouse_events: 0; \
+ description { state: "default" 0.0; \
+ rel1.to: "cit_"#_pos".rect"; \
+ rel2.to: "cit_"#_pos".rect"; \
image.normal: "outline_glow.png"; \
image.border: 4 4 4 4; \
+ visible: 0; \
} \
- description { \
- state: "selected" 0.0; \
+ description { state: "hilighted" 0.0; \
inherit: "default" 0.0; \
+ color: 255 255 255 128; \
visible: 1; \
} \
} \
- part { name: "cit_"#_pos".text"; \
- type: TEXTBLOCK; \
- mouse_events: 0; \
+ part { name: "cit_"#_pos".text"; type: TEXTBLOCK; mouse_events: 0; \
scale: 1; \
- description { \
- state: "default" 0.0; \
+ description { state: "default" 0.0; \
rel1.to: "cit_"#_pos".rect"; \
rel2.to: "cit_"#_pos".rect"; \
- text { \
- style: "calendar_date_style"; \
- min: 1 1; \
- align: 0.5 0.5; \
- } \
+ text.style: "calendar_date_style"; \
+ text.min: 1 1; \
} \
description { state: "holiday" 0.0; \
inherit: "default" 0.0; \
- text { \
- style: "calendar_date_holiday_style"; \
- min: 1 1; \
- align: 0.5 0.5; \
- } \
+ text.style: "calendar_date_holiday_style"; \
} \
description { state: "today" 0.0; \
inherit: "default" 0.0; \
- text { \
- style: "calendar_date_today_style"; \
- min: 1 1; \
- align: 0.5 0.5; \
- } \
+ text.style: "calendar_date_today_style"; \
} \
} \
- part { name: "cit_"#_pos".check"; \
- mouse_events: 0; \
+ part { name: "cit_"#_pos".check"; mouse_events: 0; \
scale: 1; \
description { state: "default" 0.0; \
+ fixed: 1 1; \
rel1 { \
to: "cit_"#_pos".rect"; \
relative: 0.6 0.5; \
@@ -338,24 +304,21 @@
relative: 0.6 0.5; \
} \
min: 16 16; \
- fixed: 1 1; \
+ max: 16 16; \
aspect: 1 1; \
- visible: 0; \
align: 0.0 1.0;\
image.normal: "icon_border_remember.png"; \
+ visible: 0; \
} \
description { state: "visible" 0.0; \
inherit: "default" 0.0; \
visible: 1; \
} \
} \
- part { name: "cit_"#_pos".access"; \
- type: RECT; \
- repeat_events: 1; \
+ part { name: "cit_"#_pos".access"; type: RECT; repeat_events: 1; \
description { state: "default" 0.0; \
rel1.to: "cit_"#_pos".event"; \
rel2.to: "cit_"#_pos".event"; \
- visible: 1; \
color: 0 0 0 0; \
} \
} \
@@ -365,6 +328,7 @@
signal: "cit_"#_pos",selected"; \
source: "elm"; \
action: STATE_SET "selected" 0.0; \
+ target: "cit_"#_pos".pat"; \
target: "cit_"#_pos".selected"; \
} \
program { \
@@ -372,6 +336,7 @@
signal: "cit_"#_pos",unselected"; \
source: "elm"; \
action: STATE_SET "default" 0.0; \
+ target: "cit_"#_pos".pat"; \
target: "cit_"#_pos".selected"; \
} \
program { \
@@ -390,6 +355,20 @@
} \
program { \
source: "cit_"#_pos".clicked"; \
+ signal: "mouse,down,1"; \
+ source: "cit_"#_pos".event"; \
+ action: STATE_SET "hilighted" 0.0; \
+ target: "cit_"#_pos".selected2"; \
+ } \
+ program { \
+ source: "cit_"#_pos".clicked"; \
+ signal: "mouse,up,1"; \
+ source: "cit_"#_pos".event"; \
+ action: STATE_SET "default" 0.0; \
+ target: "cit_"#_pos".selected2"; \
+ } \
+ program { \
+ source: "cit_"#_pos".clicked"; \
signal: "mouse,clicked,1"; \
source: "cit_"#_pos".event"; \
action: SIGNAL_EMIT "elm,action,selected" #_pos; \
@@ -440,87 +419,68 @@ group { name: "elm/calendar/base/default";
images.image: "sym_right_glow_normal.png" COMP;
images.image: "icon_border_remember.png" COMP;
images.image: "outline_glow.png" COMP;
+ images.image: "diagonal_stripes.png" COMP;
script {
- public rtl;
+ public rtl;
}
styles {
CIT_STYLES
}
parts {
- part { name: "bg";
- type: RECT;
+ part { name: "bg"; type: SPACER;
description { state: "default" 0.0;
- min: 0 30;
+ min: 0 24;
rel1.offset: 1 1;
rel2.offset: -2 -2;
- color: 255 255 255 0;
align: 0.0 0.5;
}
}
- part { name: "spinner-base1";
- type: RECT;
- mouse_events: 0;
+ part { name: "spinner-base1"; type: SPACER;
description { state: "default" 0.0;
min: 24 24;
max: 999999 24;
rel1.to: "bg";
rel1.offset: 6 6;
rel2.to: "bg";
- rel2.relative: 1.0 1.0;
rel2.offset: -7 -7;
- color: 255 255 255 0;
- align: 0.0 0.0;
}
}
- part { name: "table-base";
- type: RECT;
- mouse_events: 0;
+ part { name: "table-base"; type: SPACER;
description { state: "default" 0.0;
- min: 128 110;
+ min: 70 60;
rel1.to_x: "bg";
rel1.to_y: "spinner-base1";
rel1.offset: 6 6;
- rel1.relative: 0 1;
+ rel1.relative: 0.0 1.0;
rel2.to: "bg";
rel2.offset: -7 -7;
- color: 255 255 255 0;
}
}
- part { name: "header";
- type: RECT;
- mouse_events: 0;
+ part { name: "header"; type: SPACER;
description { state: "default" 0.0;
rel1.to: "table-base";
- rel1.relative: 0 0;
rel2.to: "table-base";
- rel2.relative: 1 0.1;
- color: 255 255 255 0;
+ rel2.relative: 1.0 0.1;
}
}
- part { name: "header_separator";
- mouse_events: 0;
+ part { name: "header_separator"; mouse_events: 0;
description { state: "default" 0.0;
rel1.to: "header";
- rel1.relative: 0 1;
+ rel1.relative: 0.0 1.0;
rel1.offset: 0 -2;
rel2.to: "header";
- rel2.relative: 1 1;
- rel2.offset: -1 -1;
image.normal: "separator_horiz.png";
- fill.smooth : 0;
+ fill.smooth: 0;
}
}
- part { name: "base";
- type: RECT;
- mouse_events: 0;
+ part { name: "base"; type: SPACER;
description { state: "default" 0.0;
rel1.to_x: "table-base";
rel1.to_y: "header";
- rel1.relative: 0 1;
+ rel1.relative: 0.0 1.0;
rel1.offset: 3 0;
rel2.to: "table-base";
rel2.offset: -3 0;
- color: 255 255 255 0;
}
}
@@ -569,10 +529,8 @@ group { name: "elm/calendar/base/double_spinners";
align: 0.0 0.0;
}
}
-
CAL_SPIN(,,month_text, spinner-base1)
CAL_SPIN(_year, year, year_text, spinner-base2)
-
}
}
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk