diff options
Diffstat (limited to 'layout/mp-slider.edc')
-rw-r--r-- | layout/mp-slider.edc | 553 |
1 files changed, 553 insertions, 0 deletions
diff --git a/layout/mp-slider.edc b/layout/mp-slider.edc new file mode 100644 index 0000000..e70cd0a --- /dev/null +++ b/layout/mp-slider.edc @@ -0,0 +1,553 @@ +#define SLIDER_INDICATOR_TEXT_COLOR_INC 42 137 194 255 +#define SLIDER_UNITS_TEXT_COLOR_INC 0 0 0 255 +#define SLIDER_UNITS_TEXT_SIZE_INC 30 +#define SLIDER_INDICATOR_TEXT_SIZE_INC 40 +#define SLIDER_BASE_HEIGHT_INC 16 +#define SLIDER_BASE_MIN_WIDTH_INC 375 +#define SLIDER_BASE_HEIGHT_INC 16 +#define SLIDER_SWALLOW_BAR_MIN_WIDTH_INC 58 +#define SLIDER_SWALLOW_BAR_HEIGHT_INC 58 +#define SLIDER_INDICATOR_MAX_WIDTH_INC 90 +#define SLIDER_INDICATOR_WIDTH_INC 58 +#define SLIDER_INDICATOR_HEIGHT_INC 58 + + + +group { name: "elm/slider/horizontal/indicator/default"; + alias: "elm/slider/horizontal/indicator/disabled"; + alias: "elm/slider/vertical/indicator/default"; + alias: "elm/slider/vertical/indicator/disabled"; + alias: "elm/slider/horizontal/indicator/tap_to_drag"; + images { + image: "00_slider_handle.png" COMP; + image: "00_slider_handle_dim.png" COMP; + } + parts { + part { name: "button_events"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + min: 2*SLIDER_INDICATOR_WIDTH_INC 1.5*SLIDER_INDICATOR_HEIGHT_INC; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + color: 0 0 0 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "button0"; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC; + max: SLIDER_INDICATOR_MAX_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC; + rel1 { + to: "elm.indicator"; + offset: -2 -2; + } + rel2 { + to: "elm.indicator"; + offset: 2 2; + } + image { + normal: "00_slider_handle.png"; + border: 3 3 3 3; + border_scale: 1; + } + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image { + normal: "00_slider_handle_dim.png"; + } + } + } + part { name: "elm.indicator"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 1; + color: SLIDER_INDICATOR_TEXT_COLOR_INC; + text { + font: "SLP:style=Medium"; + size: SLIDER_INDICATOR_TEXT_SIZE_INC; + min: 1 1; + align: 0.5 0.5; + text_class: "slp_medium"; + } + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + } + programs { + program { name: "set_val_show"; + signal: "elm,state,val,show"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.indicator"; + } + program { name: "set_val_hide"; + signal: "elm,state,val,hide"; + source: "elm"; + action: STATE_SET "hide" 0.0; + target: "elm.indicator"; + } + program { name: "slider_disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "button0"; + target: "button_events"; + } + program { name: "slider_enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "button0"; + target: "button_events"; + } + } +} + +group { name: "elm/slider/horizontal/music-player/default"; + alias: "elm/slider/horizontal/music-player/disabled"; + images { + image: "00_winset_list_progress_bg.png" COMP; + image: "00_winset_list_progress_bar.png" COMP; + image: "00_slider_popup_bg.png" COMP; + } + script { + public invert_on = 0; + public set_invert_on() { + set_state(PART:"level", "inverted", 0.0); + set_state(PART:"level2", "inverted", 0.0); + set_int(invert_on, 1); + } + public set_invert_off() { + set_state(PART:"level", "default", 0.0); + set_state(PART:"level2", "default", 0.0); + set_int(invert_on, 0); + } + public thumb_down() { + if(get_int(invert_on) == 0) + set_state(PART:"level", "pressed", 0.0); + else if(get_int(invert_on) == 1) + set_state(PART:"level2", "pressed", 0.0); + } + public thumb_up() { + if(get_int(invert_on) == 0) + set_state(PART:"level", "default", 0.0); + else if(get_int(invert_on) == 1) + set_state(PART:"level2", "inverted", 0.0); + } + } + parts { + part { name: "slider_bg_area"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 0; to_x: "elm.swallow.icon"; offset: -16 0; } + rel2 { relative: 1 1; to_x: "elm.swallow.end"; offset: 16 0; } + visible: 0; + } + } + part { name: "bg_image"; + type: IMAGE; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + rel1.to: "slider_bg_area"; + rel2.to: "slider_bg_area"; + image { normal: "00_slider_popup_bg.png"; border: 7 7 5 12; } + } + } + + part { name: "base"; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + min: SLIDER_BASE_MIN_WIDTH_INC SLIDER_BASE_HEIGHT_INC; + max: 99999 SLIDER_BASE_HEIGHT_INC; + rel1.to: "bg"; + rel2.to: "bg"; + image.normal: "00_winset_list_progress_bg.png"; + image.border: 0 0 4 4; + image.border_scale: 1; + } + } + part { name: "level"; + mouse_events: 0; + scale: 1; + clip_to: "clipper"; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to: "base"; + rel2 { + to_y: "base"; + to_x: "elm.dragable.slider"; + relative: 0.5 1.0; + } + image.normal: "00_winset_list_progress_bar.png"; + image.border: 0 0 4 4; + image.border_scale: 1; + } + description { state: "inverted" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + image.normal: "00_winset_list_progress_bar.png"; + } + } + part { name: "level2"; + mouse_events: 0; + scale: 1; + clip_to: "clipper"; + description { state: "default" 0.0; + fixed: 1 1; + visible: 0; + rel1 { + to_y: "base"; + to_x: "elm.dragable.slider"; + relative: 0.5 0.0; + } + rel2.to: "base"; + image.normal: "00_winset_list_progress_bg.png"; + image.border: 0 0 4 4; + image.border_scale: 1; + } + description { state: "inverted" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + visible: 1; + image.normal: "00_winset_list_progress_bg.png"; + } + } + part { name: "bg"; + type: RECT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1.to: "elm.swallow.bar"; + rel2.to: "elm.swallow.bar"; + } + } + part { name: "elm.swallow.bar"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + min: SLIDER_SWALLOW_BAR_MIN_WIDTH_INC SLIDER_SWALLOW_BAR_HEIGHT_INC; + max: 99999 SLIDER_SWALLOW_BAR_HEIGHT_INC; + align: 1.0 0.5; + rel1 { + to_x: "bar_left_padding"; + relative: 1.0 0.0; + } + rel2 { + to_x: "bar_right_padding"; + relative: 0.0 1.0; + } + } + } + part { + name: "bar_left_padding"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + min: 10 0; + fixed: 1 1; + rel1 { + relative: 1.0 0.5; + to_x: "elm.text"; + } + rel2 { + relative: 1.0 0.5; + to_x: "elm.text"; + } + align: 0.0 0.5; + } + } + part { + name: "bar_right_padding"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + min: 10 0; + fixed: 1 1; + rel1 { + relative: 0.0 0.5; + to_x: "elm.units"; + } + rel2 { + relative: 0.0 0.5; + to_x: "elm.units"; + } + align: 1.0 0.5; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 { + to_y: "elm.swallow.bar"; + } + rel2 { + relative: 0.0 1.0; + to_y: "elm.swallow.bar"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "elm.text"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + fixed: 1 1; + align: 0.0 0.5; + rel1.to_x: "elm.swallow.icon"; + rel1.relative: 1.0 0.0; + rel2.to_x: "elm.swallow.icon"; + color: SLIDER_UNITS_TEXT_COLOR_INC; + text { + font: "SLP:style=Medium"; + size: SLIDER_UNITS_TEXT_SIZE_INC; + min: 0 0; + align: 0.0 0.5; + text_class: "slp_medium"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + text.min: 1 1; + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 1.0 0.5; + rel1 { + relative: 1.0 0.0; + to_y: "elm.swallow.bar"; + } + rel2 { + relative: 1.0 1.0; + to_y: "elm.swallow.bar"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "units"; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1 { + to_x: "elm.units"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "elm.units"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + fixed: 1 1; + align: 1.0 0.5; + rel1.to_x: "elm.swallow.end"; + rel2.relative: 0.0 1.0; + rel2.to_x: "elm.swallow.end"; + color: SLIDER_UNITS_TEXT_COLOR_INC; + text { + font: "SLP:style=Bold"; + size: SLIDER_UNITS_TEXT_SIZE_INC; + min: 0 0; + align: 0.0 0.5; + text_class: "slp_bold"; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + fixed: 1 1; + visible: 1; + text.min: 1 1; + } + } + part { name: "elm.dragable.slider"; + type: GROUP; + source: "elm/slider/horizontal/indicator/default"; + mouse_events: 1; + scale: 1; + dragable { + x: 1 1 0; + y: 0 0 0; + confine: "bg"; + } + description { state: "default" 0.0; + min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC; + fixed: 1 1; + align: 0.5 0.5; + color: 0 0 0 0; + } + } + part { name: "disabler"; + type: RECT; + mouse_events: 1; + repeat_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "clipper"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + color: 255 255 255 102; + } + } + } + programs { + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "elm.text"; + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.text"; + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "elm.swallow.icon"; + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.icon"; + } + program { name: "end_show"; + signal: "elm,state,end,visible"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "elm.swallow.end"; + } + program { name: "end_hide"; + signal: "elm,state,end,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.end"; + } + program { name: "units_show"; + signal: "elm,state,units,visible"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "elm.units"; + target: "units"; + } + program { name: "units_hide"; + signal: "elm,state,units,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.units"; + target: "units"; + } + program { name: "invert_on"; + signal: "elm,state,inverted,on"; + source: "elm"; + script { + set_invert_on(); + } + } + program { name: "invert_off"; + signal: "elm,state,inverted,off"; + source: "elm"; + script { + set_invert_off(); + } + } + program { name: "val_show"; + signal: "mouse,down,*"; + source: "elm.dragable.slider"; + script { + thumb_down(); + } + } + program { name: "val_hide"; + signal: "mouse,up,*"; + source: "elm.dragable.slider"; + script { + thumb_up(); + } + } + program { name: "slider_disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disabler"; + target: "clipper"; + } + program { name: "slider_enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disabler"; + target: "clipper"; + } + } +} + |