From: Enlightenment S. <no-...@en...> - 2011-08-20 01:21:04
|
Log: themes/dtrs: increase slider dragable size to make it usable for touchscreen Author: jeffdameth Date: 2011-08-19 18:20:56 -0700 (Fri, 19 Aug 2011) New Revision: 62606 Trac: http://trac.enlightenment.org/e/changeset/62606 Modified: trunk/THEMES/detourious/bits/slider.edc Modified: trunk/THEMES/detourious/bits/slider.edc =================================================================== --- trunk/THEMES/detourious/bits/slider.edc 2011-08-20 01:02:43 UTC (rev 62605) +++ trunk/THEMES/detourious/bits/slider.edc 2011-08-20 01:20:56 UTC (rev 62606) @@ -7,32 +7,22 @@ name: "base"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 157 57 11 0; - - rel1 { - offset: 2 2; - } - - rel2 { - offset: -7 -3; - } + rel1.offset: 2 2; + rel2.offset: -7 -3; } - description { state: "active" 0.0; color: 157 57 11 0; - - rel1 { - offset: 2 -1; + rel1 { + offset: 2 -1; } - - rel2 { - to_x: "label_under"; - relative: 0.0 1.0; - offset: -6 -3; + rel2 { + to_x: "label_under"; + relative: 0.0 1.0; + offset: -6 -3; } } } @@ -42,28 +32,19 @@ type: IMAGE; mouse_events: 0; clip_to: "clip"; - description { state: "default" 0.0; max: 99999 16; min: 40 16; - - rel1 { - to: "base"; - offset: 6 -1; - } - - rel2 { - to: "base"; - offset: -5 -2; - } - + rel1.to: "base"; + rel1.offset: 6 -1; + rel2.to: "base"; + rel2.offset: -5 -2; image { normal: "images/runner_im0.png"; border: 6 6 0 0; } } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -75,43 +56,32 @@ name: "label_under"; type: IMAGE; mouse_events: 0; - description { state: "default" 0.0; min: 40 24; max: 9999 24; visible: 0; fixed: 1 0; - image { normal: "images/entry_im0.png"; border: 6 6 8 7; } - - fill { - smooth: 1; - } } - description { state: "active" 0.0; min: 40 24; - /* align: 0.0 1.0; */ fixed: 1 0; - rel1 { to: "e.text.label"; relative: 0.0 0.0; offset: -11 -4; } - rel2 { to: "e.text.label"; relative: 1.0 1.0; offset: 9 1; } - image { normal: "images/entry_im0.png"; border: 6 6 8 7; @@ -123,34 +93,26 @@ name: "label_focus"; type: IMAGE; mouse_events: 0; - description { state: "default" 0.0; min: 22 24; visible: 0; - align: 0.0 0.5; + align: 0.0 0.5; rel1 { to: "e.text.label"; relative: 0.0 0.0; offset: -11 -4; } - rel2 { to: "e.text.label"; relative: 1.0 1.0; offset: 9 5; } - image { normal: "images/entry_im1.png"; border: 7 7 8 7; } - - fill { - smooth: 1; - } } - description { state: "active" 0.0; inherit: "default" 0.0; @@ -163,25 +125,21 @@ type: TEXT; mouse_events: 0; clip_to: "clip"; - description { state: "default" 0.0; visible: 0; fixed: 1 0; } - description { state: "active" 0.0; - align: 1.0 0.5; + align: 1.0 0.5; fixed: 1 0; min: 30 10; TEXT_COLOR; - rel1 { relative: 1.0 0.0; offset: -8 7; } - rel2 { relative: 1.0 1.0; offset: -8 -8; @@ -195,15 +153,13 @@ name: "slider_p1"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 18 119 186 0; - - rel2 { - to: "e.dragable.slider"; - relative: 0.0 1.0; - offset: -1 -1; + rel2 { + to: "e.dragable.slider"; + relative: 0.0 1.0; + offset: -1 -1; } } } @@ -212,15 +168,13 @@ name: "slider_p2"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 231 93 7 0; - - rel2 { - to: "e.dragable.slider"; - relative: 1.0 0.0; - offset: 0 0; + rel2 { + to: "e.dragable.slider"; + relative: 1.0 0.0; + offset: 0 0; } } } @@ -229,21 +183,18 @@ name: "confine_area"; type: RECT; mouse_events: 0; - description { state: "default" 0.0; - max: 99999 16; + max: 99999 40; fixed: 1 1; color: 255 0 0 0; - - rel1 { - to: "base"; - offset: 1 0; + rel1 { + to: "base"; + offset: 1 0; } - - rel2 { - to: "base"; - offset: -1 -1; + rel2 { + to: "base"; + offset: -1 -1; } } } @@ -252,30 +203,26 @@ name: "e.dragable.slider"; type: RECT; mouse_events: 1; - dragable { x: 1 1 0; y: 0 0 0; confine: "confine_area"; } - description { state: "default" 0.0; - min: 29 17; - max: 29 17; + min: 29 40; + max: 29 40; fixed: 1 1; color: 255 0 0 0; - - rel1 { - to: "base"; - relative: 0.5 0.5; - offset: 0 0; + rel1 { + to: "base"; + relative: 0.5 0.5; + offset: 0 0; } - - rel2 { - to: "base"; - relative: 0.5 0.5; - offset: 0 0; + rel2 { + to: "base"; + relative: 0.5 0.5; + offset: 0 0; } } } @@ -284,18 +231,15 @@ name: "shadow_focus_clip"; type: RECT; mouse_events: 0; - description { state: "default" 0.0; color: 255 255 255 128; } - description { state: "focused" 0.0; inherit: "default" 0.0; color: 255 255 255 64; } - description { state: "disabled" 0.0; inherit: "focused" 0.0; @@ -307,28 +251,20 @@ type: IMAGE; mouse_events: 0; clip_to: "shadow_focus_clip"; - description { state: "default" 0.0; - - rel1 { - to: "slider_image"; - offset: 1 -1; + rel1 { + to: "slider_image"; + offset: 1 -1; } - - rel2 { - to: "slider_image"; - offset: -2 -1; + rel2 { + to: "slider_image"; + offset: -2 -1; } - image { normal: "images/slider_im1.png"; border: 7 8 7 7; } - - fill { - smooth: 1; - } } } @@ -337,32 +273,20 @@ type: IMAGE; mouse_events: 0; //clip_to: "clip"; - description { state: "default" 0.0; min: 29 17; max: 29 17; fixed: 1 1; - - rel1 { - to: "e.dragable.slider"; - } - - rel2 { - to: "e.dragable.slider"; - } - - image { - normal: "images/slider_im0.png"; - } + rel1.to: "e.dragable.slider"; + rel2.to: "e.dragable.slider"; + image.normal: "images/slider_im0.png"; } - description { state: "clicked" 0.0; inherit: "default" 0.0; color: 235 235 235 255; } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -373,11 +297,9 @@ name: "clip"; type: RECT; mouse_events: 0; - description { state: "default" 0.0; } - description { state: "disabled" 0.0; color: 255 255 255 128; @@ -388,13 +310,11 @@ name: "catch"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; visible: 0; color: 0 0 0 0; } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -408,12 +328,12 @@ # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: ACT; \ - target: TARGET; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: ACT; \ + target: TARGET; \ } PROG("slider-", "mouse,down,1", "slider_p1", DRAG_VAL_PAGE -1.0 0.0, "e.dragable.slider"); @@ -423,13 +343,13 @@ # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: STATE_SET ACT 0.0; \ - transition: DECELERATE 0.25; \ - target: TARGET; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: STATE_SET ACT 0.0; \ + transition: DECELERATE 0.25; \ + target: TARGET; \ } PROG("up", "mouse,up,1", "e.dragable.slider", "default", "slider_image"); @@ -439,14 +359,14 @@ # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET1,TARGET2,TARGET3) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: STATE_SET ACT 0.0; \ - target: TARGET1; \ - target: TARGET2; \ - target: TARGET3; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: STATE_SET ACT 0.0; \ + target: TARGET1; \ + target: TARGET2; \ + target: TARGET3; \ } PROG("show_label", "e,action,show,label", "e", "active", "base", "label_under", "e.text.label"); @@ -502,32 +422,28 @@ name: "base"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 255 0 0 0; min: 32 10; - rel1 { - offset: 0 0; + rel1 { + offset: 0 0; } - - rel2 { - offset: -1 -1; + rel2 { + offset: -1 -1; } } - description { state: "active" 0.0; color: 255 0 0 0; min: 32 10; - rel1 { - offset: 2 2; + rel1 { + offset: 2 2; } - - rel2 { - to_y: "label_under"; - relative: 1.0 0.0; - offset: -3 -1; + rel2 { + to_y: "label_under"; + relative: 1.0 0.0; + offset: -3 -1; } } } @@ -537,28 +453,23 @@ type: IMAGE; mouse_events: 0; clip_to: "clip"; - description { state: "default" 0.0; max: 16 99999; min: 16 40; - - rel1 { - to: "base"; - offset: -1 11; + rel1 { + to: "base"; + offset: -1 11; } - - rel2 { - to: "base"; - offset: -2 -10; + rel2 { + to: "base"; + offset: -2 -10; } - image { normal: "images/runner_im1.png"; border: 0 0 6 6; } } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -570,41 +481,31 @@ name: "label_under"; type: IMAGE; mouse_events: 0; - description { state: "default" 0.0; min: 30 24; max: 9999 24; visible: 0; - image { normal: "images/entry_im0.png"; border: 6 6 8 7; } - - fill { - smooth: 1; - } } - description { state: "active" 0.0; min: 30 24; max: 9999 24; visible: 1; - - rel1 { - to: "e.text.label"; - relative: 0.0 0.0; - offset: -7 -4; + rel1 { + to: "e.text.label"; + relative: 0.0 0.0; + offset: -7 -4; } - - rel2 { - to: "e.text.label"; - relative: 1.0 1.0; - offset: 3 3; + rel2 { + to: "e.text.label"; + relative: 1.0 1.0; + offset: 3 3; } - image { normal: "images/entry_im0.png"; border: 6 6 8 7; @@ -616,35 +517,26 @@ name: "label_focus"; type: IMAGE; mouse_events: 0; - description { state: "default" 0.0; min: 27 24; max: 9999 24; visible: 0; - - rel1 { - to: "e.text.label"; - relative: 0.0 0.0; - offset: -7 -4; + rel1 { + to: "e.text.label"; + relative: 0.0 0.0; + offset: -7 -4; } - - rel2 { - to: "e.text.label"; - relative: 1.0 1.0; - offset: 3 3; + rel2 { + to: "e.text.label"; + relative: 1.0 1.0; + offset: 3 3; } - image { normal: "images/entry_im1.png"; border: 7 7 8 7; } - - fill { - smooth: 1; - } } - description { state: "active" 0.0; inherit: "default" 0.0; @@ -657,28 +549,23 @@ type: TEXT; mouse_events: 0; clip_to: "clip"; - description { state: "default" 0.0; fixed: 1 1; visible: 0; } - description { state: "active" 0.0; align: 0.5 1.0; TEXT_COLOR; - - rel1 { - relative: 0.0 1.0; - offset: 7 -8; + rel1 { + relative: 0.0 1.0; + offset: 7 -8; } - - rel2 { - relative: 1.0 1.0; - offset: -8 -8; + rel2 { + relative: 1.0 1.0; + offset: -8 -8; } - TEXT_NORMAL("slider", 0.5 0.5, 1 1); } } @@ -687,15 +574,13 @@ name: "slider_p1"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 18 119 186 0; - - rel2 { - to: "e.dragable.slider"; - relative: 1.0 0.0; - offset: -1 -1; + rel2 { + to: "e.dragable.slider"; + relative: 1.0 0.0; + offset: -1 -1; } } } @@ -704,15 +589,13 @@ name: "slider_p2"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 231 93 7 0; - - rel1 { - to: "e.dragable.slider"; - relative: 0.0 1.0; - offset: 0 0; + rel1 { + to: "e.dragable.slider"; + relative: 0.0 1.0; + offset: 0 0; } } } @@ -721,21 +604,18 @@ name: "confine_area"; type: RECT; mouse_events: 0; - description { state: "default" 0.0; - max: 16 99999; + max: 40 99999; fixed: 1 1; color: 0 0 0 0; - - rel1 { - to: "base"; - offset: 0 6; + rel1 { + to: "base"; + offset: 0 6; } - - rel2 { - to: "base"; - offset: -1 -5; + rel2 { + to: "base"; + offset: -1 -5; } } } @@ -744,30 +624,26 @@ name: "e.dragable.slider"; type: RECT; mouse_events: 1; - dragable { x: 0 0 0; y: -1 1 0; confine: "confine_area"; } - description { state: "default" 0.0; - min: 17 29; - max: 17 29; + min: 40 29; + max: 40 29; fixed: 1 1; color: 0 0 0 0; - - rel1 { - to: "base"; - relative: 0.5 0.5; - offset: 1 0; + rel1 { + to: "base"; + relative: 0.5 0.5; + offset: 1 0; } - - rel2 { - to: "base"; - relative: 0.5 0.5; - offset: 1 0; + rel2 { + to: "base"; + relative: 0.5 0.5; + offset: 1 0; } } } @@ -776,18 +652,15 @@ name: "shadow_focus_clip"; type: RECT; mouse_events: 0; - description { state: "default" 0.0; color: 255 255 255 128; } - description { state: "focused" 0.0; inherit: "default" 0.0; color: 255 255 255 64; } - description { state: "disabled" 0.0; inherit: "focused" 0.0; @@ -799,62 +672,44 @@ type: IMAGE; mouse_events: 0; clip_to: "shadow_focus_clip"; - description { state: "default" 0.0; - - rel1 { - to: "slider_image"; - offset: 0 1; + rel1 { + to: "slider_image"; + offset: 0 1; } - - rel2 { - to: "slider_image"; - offset: -1 0; + rel2 { + to: "slider_image"; + offset: -1 0; } - image { normal: "images/slider_im3.png"; border: 7 7 7 7; } - - fill { - smooth: 1; - } } } - + part { name: "slider_image"; type: IMAGE; mouse_events: 0; //clip_to: "clip"; - description { state: "default" 0.0; min: 17 29; max: 17 29; fixed: 1 1; - - rel1 { - to: "e.dragable.slider"; - } - - rel2 { - to: "e.dragable.slider"; - } - + rel1.to: "e.dragable.slider"; + rel2.to: "e.dragable.slider"; image { normal: "images/slider_im2.png"; } } - description { state: "clicked" 0.0; inherit: "default" 0.0; color: 235 235 235 255; } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -864,12 +719,10 @@ part { name: "clip"; type: RECT; - description { state: "default" 0.0; color: 255 255 255 255; } - description { state: "disabled" 0.0; color: 255 255 255 128; @@ -880,13 +733,11 @@ name: "catch"; type: RECT; mouse_events: 1; - description { state: "default" 0.0; color: 0 0 0 0; visible: 0; } - description { state: "disabled" 0.0; inherit: "default" 0.0; @@ -895,17 +746,17 @@ } } - programs { + programs { # ifdef PROG # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: ACT; \ - target: TARGET; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: ACT; \ + target: TARGET; \ } PROG("slider-", "mouse,down,1", "slider_p1", DRAG_VAL_PAGE 0.0 -1.0, "e.dragable.slider"); @@ -915,13 +766,13 @@ # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: STATE_SET ACT 0.0; \ - transition: DECELERATE 0.25; \ - target: TARGET; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: STATE_SET ACT 0.0; \ + transition: DECELERATE 0.25; \ + target: TARGET; \ } PROG("up", "mouse,up,1", "e.dragable.slider", "default", "slider_image"); @@ -931,14 +782,14 @@ # undef PROG # endif #define PROG(NAME,SIGNAL,SRC,ACT,TARGET1,TARGET2,TARGET3) \ - program { \ - name: NAME; \ - signal: SIGNAL; \ - source: SRC; \ - action: STATE_SET ACT 0.0; \ - target: TARGET1; \ - target: TARGET2; \ - target: TARGET3; \ + program { \ + name: NAME; \ + signal: SIGNAL; \ + source: SRC; \ + action: STATE_SET ACT 0.0; \ + target: TARGET1; \ + target: TARGET2; \ + target: TARGET3; \ } PROG("show_label", "e,action,show,label", "e", "active", "base", "label_under", "e.text.label"); |