aboutsummaryrefslogtreecommitdiffstats
path: root/data/themes/edc
diff options
context:
space:
mode:
authorwoochan lee <wc0917.lee@samsung.com>2016-01-04 14:55:04 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-04 14:55:54 -0800
commit4e3e6b8f02d677846aec4106a9fafea61b499f89 (patch)
treea402c8a41994eb30bf9bd5e9c47406f1d0a426c2 /data/themes/edc
parentscroller: add color classes (diff)
downloadelementary-4e3e6b8f02d677846aec4106a9fafea61b499f89.tar.gz
multibuttonentry: add color classes and text classes.
Summary: The following new color classes and text classes for multibuttonentry widget are added. "multibuttonentry_bg", "Multibuttonentry Background" "multibuttonentry_item_bg", "Multibuttonentry Item Background" "multibuttonentry_item_bg_selected", "Multibuttonentry Item Selected Background" "multibuttonentry_item_text", "Multibuttonentry Item Text" "multibuttonentry_item_text_pressed", "Multibuttonentry Item Pressed Text" "multibuttonentry_item_text_disabled", "Multibuttonentry Item Disabled Text" @feature Reviewers: raster, cedric, Hermet, kimcinoo, woohyun Subscribers: SanghyeonLee, eagleeye, id213sin Differential Revision: https://phab.enlightenment.org/D3494 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'data/themes/edc')
-rw-r--r--data/themes/edc/elm/multibuttonentry.edc84
1 files changed, 72 insertions, 12 deletions
diff --git a/data/themes/edc/elm/multibuttonentry.edc b/data/themes/edc/elm/multibuttonentry.edc
index 35eddcadf..0cca89713 100644
--- a/data/themes/edc/elm/multibuttonentry.edc
+++ b/data/themes/edc/elm/multibuttonentry.edc
@@ -7,7 +7,7 @@ group { name: "elm/multibuttonentry/base/default";
type: RECT;
scale: 1;
description { state: "default" 0.0;
- color: 0 0 0 0;
+ color_class: "multibuttonentry_bg";
}
}
part { name: "box.swallow"; type: SWALLOW;
@@ -74,7 +74,20 @@ group { name: "elm/multibuttonentry/btn/default";
tag: "tab" "\t";
}
}
+
+ script {
+ public disabled = 0;
+ }
+
parts {
+ part { name: "bg"; type: RECT;
+ description { state: "default" 0.0;
+ color_class: "multibuttonentry_item_bg";
+ }
+ description { state: "pressed" 0.0;
+ color_class: "multibuttonentry_item_bg_selected";
+ }
+ }
part { name: "base";
description { state: "default" 0.0;
image.normal: "button_normal.png";
@@ -84,7 +97,7 @@ group { name: "elm/multibuttonentry/btn/default";
rel2.offset: 0 1;
fill.smooth: 0;
}
- description { state: "clicked" 0.0;
+ description { state: "pressed" 0.0;
inherit: "default" 0.0;
image.normal: "button_clicked.png";
image.border: 5 5 4 6;
@@ -141,12 +154,12 @@ group { name: "elm/multibuttonentry/btn/default";
part { name: "elm.btn.text"; type: TEXTBLOCK; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
- color_class: "multibuttonentry_label";
+ color_class: "multibuttonentry_item_text";
text { style: "multibuttonentry_textblock_style";
min: 1 1;
ellipsis: -1;
- text_class: "multibuttonentry_label";
- }
+ text_class: "multibuttonentry_item_text";
+ }
visible: 0;
rel1.offset: 5 5;
rel1.to: "base";
@@ -159,12 +172,12 @@ group { name: "elm/multibuttonentry/btn/default";
part { name: "text"; type: TEXTBLOCK; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
- color_class: "multibuttonentry_label";
+ color_class: "multibuttonentry_item_text";
text { style: "multibuttonentry_textblock_style";
text_source: "elm.btn.text";
min: 0 1;
align: 0.0 0.5;
- text_class: "multibuttonentry_label";
+ text_class: "multibuttonentry_item_text";
}
align: 0.0 0.5;
rel1.offset: 5 5;
@@ -174,12 +187,30 @@ group { name: "elm/multibuttonentry/btn/default";
rel2.relative: 0.0 1.0;
rel2.offset: -3 -7;
}
+ description { state: "pressed" 0.0;
+ inherit: "default";
+ color_class: "multibuttonentry_item_text_pressed";
+ text {
+ text_class: "multibuttonentry_item_text_pressed";
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default";
+ color_class: "multibuttonentry_item_text_disabled";
+ text {
+ text_class: "multibuttonentry_item_text_disabled";
+ }
+ }
}
}
programs {
program {
signal: "mouse,clicked,1"; source: "base";
- action: SIGNAL_EMIT "clicked" "elm";
+ script {
+ if (get_int(disabled) == 0) {
+ emit("clicked", "");
+ }
+ }
}
program {
signal: "elm,state,default"; source: "elm";
@@ -192,14 +223,43 @@ group { name: "elm/multibuttonentry/btn/default";
target: "glow";
}
program {
+ signal: "elm,state,enabled"; source: "elm";
+ script {
+ set_state(PART:"text", "default", 0.0);
+ set_int(disabled , 0);
+ }
+ }
+ program {
+ signal: "elm,state,disabled"; source: "elm";
+ script {
+ new st[31];
+ new Float: vl;
+ get_state(PART:"glow", st, 30, vl);
+ if (!strcmp(st, "focused"))
+ set_state(PART:"glow", "default", 0.0);
+ set_state(PART:"text", "disabled", 0.0);
+ set_int(disabled , 1);
+ }
+ }
+ program {
signal: "mouse,down,1"; source: "base";
- action: STATE_SET "clicked" 0.0;
- target: "base";
+ script {
+ if (get_int(disabled) == 0) {
+ set_state(PART:"base", "pressed", 0.0);
+ set_state(PART:"bg", "pressed", 0.0);
+ set_state(PART:"text", "pressed", 0.0);
+ }
+ }
}
program {
signal: "mouse,up,1"; source: "base";
- action: STATE_SET "default" 0.0;
- target: "base";
+ script {
+ if (get_int(disabled) == 0) {
+ set_state(PART:"base", "default", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"text", "default", 0.0);
+ }
+ }
}
program {
signal: "mouse,clicked,1"; source: "del";