forked from enlightenment/efl
elm_test: add text mask case to masking demo
Summary: Depends on D8853 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8872
This commit is contained in:
parent
fd48c95f49
commit
a17ab7f044
|
@ -26,6 +26,11 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group { "masking";
|
group { "masking";
|
||||||
|
styles {
|
||||||
|
style { name: "textblock_style";
|
||||||
|
base: "font=Sans-Bold font_size=24 wrap=word color=#ffffffff";
|
||||||
|
}
|
||||||
|
}
|
||||||
parts {
|
parts {
|
||||||
rect { "clip"; norender; }
|
rect { "clip"; norender; }
|
||||||
image { "mask";
|
image { "mask";
|
||||||
|
@ -37,6 +42,23 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
textblock { "textmask";
|
||||||
|
norender;
|
||||||
|
desc {
|
||||||
|
text {
|
||||||
|
style: "textblock_style";
|
||||||
|
ellipsis: -1;
|
||||||
|
text:
|
||||||
|
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, "
|
||||||
|
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
|
||||||
|
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris "
|
||||||
|
"nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in "
|
||||||
|
"reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla "
|
||||||
|
"pariatur. Excepteur sint occaecat cupidatat non proident, sunt in "
|
||||||
|
"culpa qui officia deserunt mollit anim id est laborum.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
swallow { "mask2";
|
swallow { "mask2";
|
||||||
norender;
|
norender;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +69,9 @@ collections {
|
||||||
desc { "smartclip";
|
desc { "smartclip";
|
||||||
clip: "mask2";
|
clip: "mask2";
|
||||||
}
|
}
|
||||||
|
desc { "textclip";
|
||||||
|
clip: "textmask";
|
||||||
|
}
|
||||||
desc { "unclipped";
|
desc { "unclipped";
|
||||||
clip_to: "clip";
|
clip_to: "clip";
|
||||||
}
|
}
|
||||||
|
@ -71,6 +96,12 @@ collections {
|
||||||
action: STATE_SET "smartclip";
|
action: STATE_SET "smartclip";
|
||||||
target: "content";
|
target: "content";
|
||||||
}
|
}
|
||||||
|
program {
|
||||||
|
signal: "textclip";
|
||||||
|
source: "*";
|
||||||
|
action: STATE_SET "textclip";
|
||||||
|
target: "content";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group { "text";
|
group { "text";
|
||||||
|
|
|
@ -79,12 +79,18 @@ _toggle_mask(void *data, const Efl_Event *ev)
|
||||||
efl_key_data_set(ly, "clip", "image");
|
efl_key_data_set(ly, "clip", "image");
|
||||||
text = "Toggle mask (image)";
|
text = "Toggle mask (image)";
|
||||||
}
|
}
|
||||||
else
|
else if (eina_streq(clip, "text"))
|
||||||
{
|
{
|
||||||
elm_layout_signal_emit(ly, "smartclip", "elm_test");
|
elm_layout_signal_emit(ly, "smartclip", "elm_test");
|
||||||
efl_key_data_set(ly, "clip", "smart");
|
efl_key_data_set(ly, "clip", "smart");
|
||||||
text = "Toggle mask (smart)";
|
text = "Toggle mask (smart)";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
elm_layout_signal_emit(ly, "textclip", "elm_test");
|
||||||
|
efl_key_data_set(ly, "clip", "text");
|
||||||
|
text = "Toggle mask (text)";
|
||||||
|
}
|
||||||
efl_text_set(ev->object, text);
|
efl_text_set(ev->object, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue