From b6b3aa85d6f801291603b9608dfc4a35fdb99fb3 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Jun 2013 08:51:09 +0100 Subject: [PATCH] add focused glow to buttons phab T104 --- data/themes/edc/button.edc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/data/themes/edc/button.edc b/data/themes/edc/button.edc index efee63414..69fa1f6ff 100644 --- a/data/themes/edc/button.edc +++ b/data/themes/edc/button.edc @@ -1,6 +1,7 @@ group { name: "e/widgets/button"; images.image: "button_normal.png" COMP; images.image: "button_clicked.png" COMP; + images.image: "win_glow.png" COMP; parts { part { name: "base"; description { state: "default" 0.0; @@ -113,6 +114,25 @@ visible: 1; } } + part { name: "glow"; mouse_events: 0; + description { state: "default" 0.0; + image.normal: "win_glow.png"; + image.border: 9 9 9 9; + image.middle: 0; + rel1.to: "base"; + rel1.offset: -1 -1; + rel2.to: "base"; + rel2.offset: 1 1; + fill.smooth: 0; + color: 255 255 255 0; + visible: 0; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + } part { name: "event"; type: RECT; ignore_flags: ON_HOLD; description { state: "default" 0.0; @@ -173,5 +193,13 @@ target: "label_clip"; target: "label2"; } + program { signal: "e,state,focused"; source: "e"; + action: STATE_SET "focused" 0.0; + target: "glow"; + } + program { signal: "e,state,unfocused"; source: "e"; + action: STATE_SET "default" 0.0; + target: "glow"; + } } }