From d3b7e7277685a4e5e58b9d2748236a5c3dccde7a Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 3 Jan 2012 03:17:36 +0000 Subject: [PATCH] Elm (wayland): Implement mouse events for min, max, & close buttons in theme. Implement bottom border resize arrow animation in theme. SVN revision: 66769 --- .../elementary/data/themes/widgets/border.edc | 303 ++++++++++++++++++ 1 file changed, 303 insertions(+) diff --git a/legacy/elementary/data/themes/widgets/border.edc b/legacy/elementary/data/themes/widgets/border.edc index 1bf1304f4d..5928485235 100644 --- a/legacy/elementary/data/themes/widgets/border.edc +++ b/legacy/elementary/data/themes/widgets/border.edc @@ -123,6 +123,36 @@ group { rel1.to: "icon_area"; rel2.to: "icon_area"; } + description { + state: "uw0" 0.0; + inherit: "default" 0.0; + rel1.offset: -3 -2; + rel2.offset: -4 -3; + } + description { + state: "uw1" 0.0; + inherit: "default" 0.0; + rel1.offset: 5 -2; + rel2.offset: 4 -3; + } + description { + state: "uw2" 0.0; + inherit: "default" 0.0; + rel1.offset: -1 4; + rel2.offset: -2 3; + } + description { + state: "uw3" 0.0; + inherit: "default" 0.0; + rel1.offset: -2 -1; + rel2.offset: -3 -2; + } + description { + state: "uw4" 0.0; + inherit: "default" 0.0; + rel1.offset: -4 1; + rel2.offset: -5 0; + } } part { name: "elm.swallow.icon"; @@ -518,6 +548,200 @@ group { color: 255 255 255 255; } } + part { + name: "resize_b"; + type: IMAGE; + mouse_events: 0; + clip_to: "bottom_clip"; + description { + state: "default" 0.0; + min: 20 10; + max: 20 10; + rel1 { + relative: 0.5 0.0; + offset: 0 -10; + to: "bottom"; + } + rel2 { + relative: 0.5 0.0; + offset: 0 -1; + to: "bottom"; + } + image.normal: "bd_resize_b.png"; + } + description { + state: "past" 0.0; + inherit: "default" 0.0; + rel1 { + relative: 0.5 1.0; + offset: 0 0; + } + rel2 { + relative: 0.5 1.0; + offset: 0 9; + } + } + } + part { + name: "elm.event.titlebar"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "title_base"; + rel2.to: "title_base"; + color: 0 0 0 0; + } + } + part { + name: "elm.event.resize.t"; + type: RECT; + description { + state: "default" 0.0; + rel2 { + relative: 1.0 0.0; + offset: -1 3; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.resize.b"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + offset: 0 -4; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.resize.tl"; + type: RECT; + description { + state: "default" 0.0; + rel2 { + relative: 0.0 0.0; + offset: 15 15; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.resize.tr"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 1.0 0.0; + offset: -16 0; + } + rel2 { + relative: 1.0 0.0; + offset: -1 15; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.resize.bl"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + offset: 0 -16; + } + rel2 { + relative: 0.0 1.0; + offset: 15 -1; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.resize.br"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 1.0 1.0; + offset: -16 -16; + } + color: 0 0 0 0; + } + description { + state: "shaded" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "elm.event.icon"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "icon_area"; + rel2.to: "icon_area"; + color: 0 0 0 0; + } + } + part { + name: "elm.event.close"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "bt_close"; + rel2.to: "bt_close"; + color: 0 0 0 0; + } + } + part { + name: "elm.event.minimize"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "bt_min"; + rel2.to: "bt_min"; + color: 0 0 0 0; + } + } + part { + name: "elm.event.maximize"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "bt_max"; + rel2.to: "bt_max"; + color: 0 0 0 0; + } + } } programs { program { @@ -546,5 +770,84 @@ group { target: "buttons_unfoc"; target: "elm.text.title"; } + program { + name: "resize_b_on"; + signal: "mouse,in"; + source: "elm.event.resize.b"; + action: ACTION_STOP; + target: "resize_b_on2"; + target: "resize_b_on3"; + after: "resize_b_on2"; + } + program { + name: "resize_b_on2"; + action: STATE_SET "default" 0.0; + target: "resize_b"; + after: "resize_b_on3"; + } + program { + name: "resize_b_on3"; + action: STATE_SET "past" 0.0; + transition: LINEAR 0.5; + target: "resize_b"; + after: "resize_b_on2"; + } + program { + name: "resize_b_off"; + signal: "mouse,out"; + source: "elm.event.resize.b"; + action: ACTION_STOP; + target: "resize_b_on"; + target: "resize_b_on2"; + target: "resize_b_on3"; + } + program { + name: "bt_close_down"; + signal: "mouse,down,*"; + source: "elm.event.close"; + action: STATE_SET "active" 0.0; + target: "bt_close_unfoc"; + target: "bt_close_foc"; + } + program { + name: "bt_close_up"; + signal: "mouse,up,*"; + source: "elm.event.close"; + action: STATE_SET "default" 0.0; + target: "bt_close_unfoc"; + target: "bt_close_foc"; + } + program { + name: "bt_min_down"; + signal: "mouse,down,*"; + source: "elm.event.minimize"; + action: STATE_SET "active" 0.0; + target: "bt_min_unfoc"; + target: "bt_min_foc"; + } + program { + name: "bt_min_up"; + signal: "mouse,up,*"; + source: "elm.event.minimize"; + action: STATE_SET "default" 0.0; + target: "bt_min_unfoc"; + target: "bt_min_foc"; + } + program { + name: "bt_max_down"; + signal: "mouse,down,*"; + source: "elm.event.maximize"; + action: STATE_SET "active" 0.0; + target: "bt_max_unfoc"; + target: "bt_max_foc"; + } + program { + name: "bt_max_up"; + signal: "mouse,up,*"; + source: "elm.event.maximize"; + action: STATE_SET "default" 0.0; + target: "bt_max_unfoc"; + target: "bt_max_foc"; + } } }