diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-30 13:16:12 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-31 09:19:26 -0400 |
commit | a17ab7f044501923a420c96a9229460c2bdf1aa8 (patch) | |
tree | b41f2f0603c76edd8b4793004deb22bcf4e722c9 | |
parent | fd48c95f4907958bf10a07b2506fc12749fc92fa (diff) | |
download | efl-a17ab7f044501923a420c96a9229460c2bdf1aa8.tar.gz |
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
-rw-r--r-- | data/elementary/objects/test_masking.edc | 31 | ||||
-rw-r--r-- | src/bin/elementary/test_evas_mask.c | 8 |
2 files changed, 38 insertions, 1 deletions
diff --git a/data/elementary/objects/test_masking.edc b/data/elementary/objects/test_masking.edc index 4d8e8ed6cc..b754a7aa46 100644 --- a/data/elementary/objects/test_masking.edc +++ b/data/elementary/objects/test_masking.edc @@ -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"; diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c index 05d3933bcc..5b470e0845 100644 --- a/src/bin/elementary/test_evas_mask.c +++ b/src/bin/elementary/test_evas_mask.c @@ -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); } |