hey list,
ok i tried this suggestion and re-read the docs, my initial attached
file (with this added chnage to all programs) should work, but doesn't.
What happens that the button that has focus, is without any text, which
ever button receives focus next, is then un-texted and the now
un-focused button is also textless now.
Clousou does still show the text and does say the color as 255 0 0 255;
for example, but cannot see it anymore. So where is my edc wrong?
On 28-04-15 13:40, Olliver Schinagl wrote:
Hey all,
I'll ignore the mail mangling :p stuf,
First, thanks fory our input Viacheslav, let me repeat to understand
properly what you are saying.
To my edje program, in the button edc, I add a second target,
programs {
program { name: "button_unfocus"; source: "elm";
signal: "elm,action,unfocus"; source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ target: "elm.text";
}
My first reaction was 'huh, isn't the entire button part of the group
'base', but uppon further inspection, I saw that the first part is
also called base.
So thanks! I'll test that and keep that in mind for the future ;)
Olliver
On 28-04-15 11:39, Viacheslav Reutskyi wrote:
Hello.
Add this line to your programs :
target: "elm.text";
If you want to change the state for a few part, in program, you must
set each part as target for program.
I am want propose to try "Eflete". This is the graphical editor for
widget styles.
-----
Best regards
Viacheslav Reutskyi
12:04, April 28, 2015, Olliver Schinagl :
To reply to myself, i'll paste the relevant sections so you don't
have
to figure out what exactly i did ;)
part { name: "elm.text"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 0 5;
rel1.relative: 1.0 0.0;
rel1.to_x: "elm.swallow.content";
rel1.to_y: "base";
rel2.offset: -8 -8;
rel2.to: "base";
color_class: "button_text";
text { font: FN; size: 8;
align: 0.5 0.5;
min: 0 0;
text_class: "button";
}
visible: 0;
}
+ description { state: "focus" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 255;
+ }
and all off the following is +
programs {
program { name: "button_unfocus"; source: "elm";
signal: "elm,action,unfocus"; source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
}
program { name: "button_focus"; source: "elm";
signal: "elm,action,focus"; source: "elm";
action: STATE_SET "focus" 0.0;
target: "base";
}
The idea was, that when a button received the focus, unfocused or
'clicked' state, the font color of the button text changes
(because the
image normal image is really unreadable with a white font,
whereas the
outline image is really horrible to read witha black font.
Olliver
On 28-04-15 08:20, Olliver Schinagl wrote:
Hey list,
I've been playing with the elm_button edc (see attached) and
wanted to
change the text color of a button when the state is clicked
(and/or
focused). Can anybody verify my syntax is wrong, since it
does not
work at all :(
Changing the font-color works fine for the elm.text for the
default
state just fine, just not on the states i've described.
Thank you,
Olliver
------------------------------------------------------------------------------
One dashboard for servers and applications across
Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you
Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
Met vriendelijke groeten, Kind regards, 与亲切的问候
Olliver Schinagl
Research & Development
Ultimaker B.V.
http://www.ultimaker.com
--
IMAGINE IT >> MAKE IT
Meet us online at Twitter , Facebook
, Google+
www.ultimaker.com
------------------------------------------------------------------------------
One dashboard for servers and applications across
Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable
Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
IMAGINE IT >> MAKE IT
Meet us online atTwitter <http://twitter.com/ultimaker>,Facebook
<http://facebook.com/ultimaker>,Google+ <http://google.com/+Ultimaker>
www.ultimaker.com <http://www.ultimaker.com/>
--
Met vriendelijke groeten, Kind regards, 与亲切的问候
Olliver Schinagl
Research & Development
Ultimaker B.V.
http://www.ultimaker.com
--
Met vriendelijke groeten, Kind regards, 与亲切的问候
Olliver Schinagl
Research & Development
Ultimaker B.V.
http://www.ultimaker.com
--
IMAGINE IT >> MAKE IT
Meet us online at Twitter <http://twitter.com/ultimaker>, Facebook
<http://facebook.com/ultimaker>, Google+ <http://google.com/+Ultimaker>
www.ultimaker.com
group { name: "elm/button/base/default";
images.image: "button_normal.png" COMP;
images.image: "button_outline.png" COMP;
#define ICON 1
#define LABEL 2
#define MASK 3
#define DISABLE 4
script {
public btmode;
public eval_mode(m) {
new m1 = m & MASK;
new d = m & DISABLE;
if (m1 == (ICON | LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer.content", "visible", 0.0);
set_state(PART:"elm.text", "visible", 0.0);
set_state(PART:"icon_clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer.content", "visible", 0.0);
set_state(PART:"elm.text", "disabled_visible", 0.0);
set_state(PART:"icon_clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (ICON)) {
if (!d) {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer.content", "icononly", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"icon_clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer.content", "icononly", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"icon_clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer.content", "default", 0.0);
set_state(PART:"elm.text", "textonly", 0.0);
set_state(PART:"icon_clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer.content", "default", 0.0);
set_state(PART:"elm.text", "disabled_textonly", 0.0);
set_state(PART:"icon_clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer.content", "default", 0.0);
set_state(PART:"elm.text", "icononly", 0.0);
set_state(PART:"icon_clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer.content", "default", 0.0);
set_state(PART:"elm.text", "icononly", 0.0);
set_state(PART:"icon_clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
}
}
}
parts {
part { name: "base"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "button_outline.png";
image.border: 13 13 13 13;
image.middle: SOLID;
rel1.offset: 0 0;
rel2.offset: -1 -1;
fill.smooth: 0;
}
description { state: "focus" 0.0;
inherit: "default" 0.0;
image.normal: "button_normal.png";
}
description { state: "clicked" 0.0;
inherit: "default" 0.0;
image.normal: "button_normal.png";
}
}
part { name: "icon_clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
clip_to: "icon_clip";
description { state: "default" 0.0;
fixed: 1 0;
align: 0.0 0.5;
rel1.offset: 6 5;
rel1.to: "base";
rel2.relative: 0.0 1.0;
rel2.offset: 6 -8;
rel2.to: "base";
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
fixed: 1 0;
aspect: 1.0 1.0;
visible: 1;
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
fixed: 0 0;
align: 0.5 0.5;
rel2.relative: 1.0 1.0;
rel2.offset: -7 -8;
visible: 1;
}
}
part { name: "sizer.content"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
// fixed: 1 1;
visible: 0;
text { font: FN; size: 8;
min: 0 0;
text_class: "button_text";
}
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 0 5;
rel1.relative: 1.0 0.0;
rel1.to_x: "elm.swallow.content";
rel1.to_y: "base";
rel2.offset: -8 -8;
rel2.to: "base";
// color_class: "button_text";
color: 255 0 0 255;
text { font: FN; size: 8;
align: 0.5 0.5;
min: 0 0;
text_class: "button";
}
visible: 0;
}
description { state: "focus" 0.0;
inherit: "default" 0.0;
// color_class: "button_text_focus";
text { font: FN; size: 8;
align: 0.5 0.5;
min: 0 0;
text_class: "button";
}
color: 0 255 0 255;
}
description { state: "clicked" 0.0;
inherit: "default" 0.0;
// color_class: "button_text_focus";
text { font: FN; size: 8;
align: 0.5 0.5;
min: 0 0;
text_class: "button";
}
color: 0 0 255 255;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.offset: 2 5;
text.min: 1 1;
text.ellipsis: -1;
visible: 1;
}
description { state: "textonly" 0.0;
inherit: "default" 0.0;
text.min: 1 1;
text.ellipsis: -1;
visible: 1;
}
description { state: "disabled_visible" 0.0;
inherit: "default" 0.0;
rel1.offset: 2 5;
color_class: "button_text_disabled";
text.min: 1 1;
text.ellipsis: -1;
visible: 1;
}
description { state: "disabled_textonly" 0.0;
inherit: "default" 0.0;
color_class: "button_text_disabled";
text.min: 1 1;
text.ellipsis: -1;
visible: 1;
}
}
part { name: "event"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program { name: "button_unfocus";
signal: "elm,action,unfocus"; source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
target: "elm.text";
}
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";
action: SIGNAL_EMIT "elm,action,press" "elm";
after: "button_click_anim";
}
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";
action: SIGNAL_EMIT "elm,action,unpress" "elm";
after: "button_unclick_anim";
}
program { name: "button_unclick_anim";
action: STATE_SET "default" 0.0;
target: "base";
target: "elm.text";
}
program { name: "buttonactivate";
signal: "elm,anim,activate"; source: "elm";
action: STATE_SET "clicked" 0.0;
target: "base";
target: "elm.text";
after: "button_unpressed_anim";
}
program { name: "button_unpressed_anim";
action: STATE_SET "default" 0.0;
in: 0.5 0.0;
target: "base";
target: "elm.text";
}
program {
signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "elm,action,click" "elm";
}
program { name: "button_text_visible";
signal: "elm,state,text,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { name: "button_text_hidden";
signal: "elm,state,text,hidden"; source: "elm";
script {
new m = get_int(btmode);
m &= ~LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { name: "button_icon_visible";
signal: "elm,state,icon,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { name: "button_icon_hidden";
signal: "elm,state,icon,hidden"; source: "elm";
action: STATE_SET "default" 0.0;
script {
new m = get_int(btmode);
m &= ~ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { name: "button_state_disabled";
signal: "elm,state,disabled"; source: "elm";
script {
new m = get_int(btmode);
m |= DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
program { name: "button_state_enabled";
signal: "elm,state,enabled"; source: "elm";
script {
new m = get_int(btmode);
m &= ~DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
}
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel