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
devs/vitorsousa/constructible_eflsharp
Mike Blumenkrantz 4 years ago
parent fd48c95f49
commit a17ab7f044
  1. 31
      data/elementary/objects/test_masking.edc
  2. 8
      src/bin/elementary/test_evas_mask.c

@ -26,6 +26,11 @@ collections {
}
}
group { "masking";
styles {
style { name: "textblock_style";
base: "font=Sans-Bold font_size=24 wrap=word color=#ffffffff";
}
}
parts {
rect { "clip"; norender; }
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";
norender;
}
@ -47,6 +69,9 @@ collections {
desc { "smartclip";
clip: "mask2";
}
desc { "textclip";
clip: "textmask";
}
desc { "unclipped";
clip_to: "clip";
}
@ -71,6 +96,12 @@ collections {
action: STATE_SET "smartclip";
target: "content";
}
program {
signal: "textclip";
source: "*";
action: STATE_SET "textclip";
target: "content";
}
}
}
group { "text";

@ -79,12 +79,18 @@ _toggle_mask(void *data, const Efl_Event *ev)
efl_key_data_set(ly, "clip", "image");
text = "Toggle mask (image)";
}
else
else if (eina_streq(clip, "text"))
{
elm_layout_signal_emit(ly, "smartclip", "elm_test");
efl_key_data_set(ly, "clip", "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);
}

Loading…
Cancel
Save