diff options
author | Jaehwan Kim <jae.hwan.kim@samsung.com> | 2016-02-25 13:46:53 +0900 |
---|---|---|
committer | Jaehwan Kim <jae.hwan.kim@samsung.com> | 2016-02-25 13:51:20 +0900 |
commit | af45e5580ef74be3ffc5a97777f1120f8d830f2f (patch) | |
tree | f103056f3f5c44fdffeb45d9628676a98448202a /data | |
parent | 2c3659d5cec7c9ed48a1e663062f36a4a0d6d33a (diff) | |
download | elementary-af45e5580ef74be3ffc5a97777f1120f8d830f2f.tar.gz |
panes: add the style to fold by clicking
Some area that is split by this style panes can be folded by clicking.
The styles are "left-fold", "right-fold", "up-fold", "down-fold".
@feature
Diffstat (limited to 'data')
-rw-r--r-- | data/themes/edc/elm/panes.edc | 252 |
1 files changed, 252 insertions, 0 deletions
diff --git a/data/themes/edc/elm/panes.edc b/data/themes/edc/elm/panes.edc index 45b6d4a48..9009123f9 100644 --- a/data/themes/edc/elm/panes.edc +++ b/data/themes/edc/elm/panes.edc @@ -743,3 +743,255 @@ group { name: "elm/panes/horizontal/flush"; } } } + +group { name: "elm/panes/vertical/left-fold"; + inherit: "elm/panes/vertical/default"; + images.image: "icon_arrow_left.png" COMP; + images.image: "icon_arrow_right.png" COMP; + script { + public open; + public drag_x; + public drag_y; + } + parts { + spacer { "sub_whole"; + desc { "default"; + rel1.offset: 3 0; + } + } + image { "dots"; + desc { "default"; + image.normal: "icon_arrow_left.png"; + FIXED_SIZE(14, 14) + } + desc { "closed"; + inherit: "default" 0.0; + image.normal: "icon_arrow_right.png"; + } + } + rect { "event"; + repeat; + desc { "default"; + rel1.to: "dots"; + rel2.to: "dots"; + color: 0 0 0 0; + } + } + } + programs { + program { signal: "load"; source: ""; + script { + set_int(open, 1); + } + } + program { signal: "mouse,clicked,1"; source: "event"; + script { + if (get_int(open) == 1) + { + new Float: dx; + new Float: dy; + set_int(open, 0); + get_drag(PART:"elm.bar", dx, dy); + set_float(drag_x, dx); + set_drag(PART:"elm.bar", 0.0, 0.5); + set_state(PART:"dots", "closed", 0.0); + } + else if (get_int(open) == 0) + { + set_int(open, 1); + set_drag(PART:"elm.bar", get_float(drag_x), 0.5); + set_state(PART:"dots", "default", 0.0); + } + } + } + } +} + +group { name: "elm/panes/vertical/right-fold"; + inherit: "elm/panes/vertical/default"; + images.image: "icon_arrow_left.png" COMP; + images.image: "icon_arrow_right.png" COMP; + script { + public open; + public drag_x; + public drag_y; + } + parts { + spacer { "sub_whole"; + desc { "default"; + rel2.offset: -4 0; + } + } + image { "dots"; + desc { "default"; + image.normal: "icon_arrow_right.png"; + FIXED_SIZE(14, 17) + } + desc { "closed"; + inherit: "default" 0.0; + image.normal: "icon_arrow_left.png"; + } + } + rect { "event"; + repeat; + desc { "default"; + rel1.to: "dots"; + rel2.to: "dots"; + color: 0 0 0 0; + } + } + } + programs { + program { signal: "load"; source: ""; + script { + set_int(open, 1); + } + } + program { signal: "mouse,clicked,1"; source: "event"; + script { + if (get_int(open) == 1) + { + new Float: dx; + new Float: dy; + set_int(open, 0); + get_drag(PART:"elm.bar", dx, dy); + set_float(drag_x, dx); + set_drag(PART:"elm.bar", 1.0, 0.5); + set_state(PART:"dots", "closed", 0.0); + } + else if (get_int(open) == 0) + { + set_int(open, 1); + set_drag(PART:"elm.bar", get_float(drag_x), 0.5); + set_state(PART:"dots", "default", 0.0); + } + } + } + } +} + +group { name: "elm/panes/horizontal/up-fold"; + inherit: "elm/panes/horizontal/default"; + images.image: "icon_arrow_up.png" COMP; + images.image: "icon_arrow_down.png" COMP; + script { + public open; + public drag_x; + public drag_y; + } + parts { + spacer { "sub_whole"; + desc { "default"; + rel1.offset: 0 3; + } + } + image { "dots"; + desc { "default"; + image.normal: "icon_arrow_up.png"; + FIXED_SIZE(17, 14) + } + desc { "closed"; + inherit: "default" 0.0; + image.normal: "icon_arrow_down.png"; + } + } + rect { "event"; + repeat; + desc { "default"; + rel1.to: "dots"; + rel2.to: "dots"; + color: 0 0 0 0; + } + } + } + programs { + program { signal: "load"; source: ""; + script { + set_int(open, 1); + } + } + program { signal: "mouse,clicked,1"; source: "event"; + script { + if (get_int(open) == 1) + { + new Float: dx; + new Float: dy; + set_int(open, 0); + get_drag(PART:"elm.bar", dx, dy); + set_float(drag_y, dy); + set_drag(PART:"elm.bar", 0.5, 0.0); + set_state(PART:"dots", "closed", 0.0); + } + else if (get_int(open) == 0) + { + set_int(open, 1); + set_drag(PART:"elm.bar", 0.5, get_float(drag_y)); + set_state(PART:"dots", "default", 0.0); + } + } + } + } +} + +group { name: "elm/panes/horizontal/down-fold"; + inherit: "elm/panes/horizontal/default"; + images.image: "icon_arrow_up.png" COMP; + images.image: "icon_arrow_down.png" COMP; + script { + public open; + public drag_x; + public drag_y; + } + parts { + spacer { "sub_whole"; + desc { "default"; + rel2.offset: 0 -4; + } + } + image { "dots"; + desc { "default"; + image.normal: "icon_arrow_down.png"; + FIXED_SIZE(17, 14) + } + desc { "closed"; + inherit: "default" 0.0; + image.normal: "icon_arrow_up.png"; + } + } + rect { "event"; + repeat; + desc { "default"; + rel1.to: "dots"; + rel2.to: "dots"; + color: 0 0 0 0; + } + } + } + programs { + program { signal: "load"; source: ""; + script { + set_int(open, 1); + } + } + program { signal: "mouse,clicked,1"; source: "event"; + script { + if (get_int(open) == 1) + { + new Float: dx; + new Float: dy; + set_int(open, 0); + get_drag(PART:"elm.bar", dx, dy); + set_float(drag_y, dy); + set_drag(PART:"elm.bar", 0.5, 1.0); + set_state(PART:"dots", "closed", 0.0); + } + else if (get_int(open) == 0) + { + set_int(open, 1); + set_drag(PART:"elm.bar", 0.5, get_float(drag_y)); + set_state(PART:"dots", "default", 0.0); + } + } + } + } +} |