summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <o.schinagl@ultimaker.com>2015-04-29 08:35:07 (GMT)
committerOlliver Schinagl <o.schinagl@ultimaker.com>2015-04-29 08:35:07 (GMT)
commitc3658d4365f7d2412cf967ba51786d86550b5c2a (patch)
tree97ee83362ffc8f6142f8288db9d5279f4080b916
parent4e085efd845434aefe78dc5a93e63aa830cdf77c (diff)
downloadeulogium-c3658d4365f7d2412cf967ba51786d86550b5c2a.zip
eulogium-c3658d4365f7d2412cf967ba51786d86550b5c2a.tar.gz
eulogium-c3658d4365f7d2412cf967ba51786d86550b5c2a.tar.bz2
Handle button text visibility properly
Button text's can have several states and those are associated with certain looks. By default, the button is invisible and show() is called on it to make it visible. This patch sets the visible flag properly and adds all potential states we may have, setting the proper font color to match the button skin. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
-rw-r--r--data/themes/default/edc/elm/button.edc22
1 files changed, 18 insertions, 4 deletions
diff --git a/data/themes/default/edc/elm/button.edc b/data/themes/default/edc/elm/button.edc
index 0e58608..4645f9e 100644
--- a/data/themes/default/edc/elm/button.edc
+++ b/data/themes/default/edc/elm/button.edc
@@ -171,13 +171,23 @@ group { name: "elm/button/base/default";
}
visible: 0;
}
+ description { state: "unfocus" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
description { state: "focus" 0.0;
inherit: "default" 0.0;
color_class: "button_text_focus";
+ visible: 1;
}
description { state: "clicked" 0.0;
inherit: "default" 0.0;
color_class: "button_text_focus";
+ visible: 1;
+ }
+ description { state: "unclicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
@@ -219,15 +229,17 @@ group { name: "elm/button/base/default";
}
}
programs {
- program { name: "button_unfocus"; source: "elm";
+ program { name: "button_unfocus";
signal: "elm,action,unfocus"; source: "elm";
- action: STATE_SET "default" 0.0;
+ action: STATE_SET "unfocus" 0.0;
target: "base";
+ target: "elm.text";
}
- program { name: "button_focus"; source: "elm";
+ program { name: "button_focus";
signal: "elm,action,focus"; source: "elm";
action: STATE_SET "focus" 0.0;
target: "base";
+ target: "elm.text";
}
program {
signal: "mouse,down,1"; source: "event";
@@ -237,6 +249,7 @@ group { name: "elm/button/base/default";
program { name: "button_click_anim";
action: STATE_SET "clicked" 0.0;
target: "base";
+ target: "elm.text";
}
program { name: "button_unclick";
signal: "mouse,up,1"; source: "event";
@@ -244,8 +257,9 @@ group { name: "elm/button/base/default";
after: "button_unclick_anim";
}
program { name: "button_unclick_anim";
- action: STATE_SET "default" 0.0;
+ action: STATE_SET "unclicked" 0.0;
target: "base";
+ target: "elm.text";
}
program { name: "buttonactivate";
signal: "elm,anim,activate"; source: "elm";