[UI] Focus state updated for the date/time buttons. 37/129237/2
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Mon, 15 May 2017 14:40:18 +0000 (16:40 +0200)
committerRadek Kintop <r.kintop@samsung.com>
Thu, 18 May 2017 10:08:37 +0000 (12:08 +0200)
Change-Id: I0a0e53d515f1031779275475a762d1829547af13
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
res/images/4.0/bg_settings_clock_focused.#.png [moved from res/images/4.0/bg_settings_clock_focused.9.png with 100% similarity]
res/images/4.0/bg_settings_clock_pressed.#.png [moved from res/images/4.0/bg_settings_clock_pressed.9.png with 100% similarity]
res/images/4.0/bg_settings_clock_shadow.#.png [moved from res/images/4.0/bg_settings_clock_shadow.9.png with 100% similarity]
res/widget/button.edc
src/view/system/view_clock.c

index 12b3c2e..6b5da8a 100755 (executable)
 
 group {
        name, "elm/button/base/style.menu.button";
-       data.item, "focus_highlight" "on";
+       data {
+               item: "focus_highlight" "on";
+       
+       }
        script {
                public focused;
                public selected;
@@ -824,6 +827,127 @@ group {
        }
 }
 
+#define CLOCK_FOCUSED "4.0/bg_settings_clock_focused.#.png"
+#define CLOCK_PRESSED "4.0/bg_settings_clock_pressed.#.png"
+#define CLOCK_SHADOW "4.0/bg_settings_clock_shadow.#.png"
+
+group {
+       name, "elm/button/base/style.date_time.button";
+       inherit, "elm/button/base/style.normal.button";
+       data.item, "focus_highlight" "on";
+       images {
+               image: CLOCK_FOCUSED COMP;
+               image: CLOCK_PRESSED COMP;
+               image: CLOCK_SHADOW RAW;
+       }
+       parts {
+               part {
+                       name: "area";
+                       type: RECT;
+                       scale: 0;
+                       description {
+                               state: "default" 0.0;
+                               min: 388 80;
+                               color: 0 0 0 0;
+                               align: 0.0 0.0;
+                       }
+               }
+               part {
+                       name: "shadow";
+                       type: IMAGE;
+                       scale: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "bg";
+                               rel2.to: "bg";
+                               rel1.relative: -0.06 -0.3;
+                               rel2.relative: 1.06 1.3;
+                               color: 255 255 255 0;
+                               align: 0.5 0.5;
+                               image.normal: CLOCK_SHADOW;
+                       }
+                       description {
+                               state, "focused" 0.0;
+                               inherit, "default" 0.0;
+                               color: 255 0 0 255;
+                       }
+                       description {
+                               state, "mouse_down" 0.0;
+                               inherit, "default" 0.0;
+                       }
+               }
+               part {
+                       name: "bg";
+                       type: IMAGE;
+                       scale: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1.relative: 0.0 0.0;
+                               rel2.relative: 1.0 1.0;
+                               color: 255 255 255 0;
+                               image.normal: CLOCK_FOCUSED;
+                       }
+                       description {
+                               state, "focused" 0.0;
+                               inherit, "default" 0.0;
+                               rel1.relative: 0.0 0.0;
+                               rel2.relative: 1.0 1.0;
+                               color: 255 255 255 255;
+                               image.normal: CLOCK_FOCUSED;
+                       }
+                       description {
+                               state, "mouse_down" 0.0;
+                               inherit, "default" 0.0;
+                               color: 255 255 255 255;
+                               image.normal: CLOCK_PRESSED;
+                       }
+               }
+               part {
+                       name, "bg.content";
+                       type, SPACER;
+                       scale: 0;
+                       description {
+                               state, "default" 0.0;
+                               max, 388 254;
+                               rel1.to, "bg";
+                               rel2.to, "bg";
+                               align, 0.5 0.5;
+                               fixed, 1 1;
+                       }
+               }
+               part {
+                       name, "elm.text";
+                       type, TEXT;
+                       repeat_events, 1;
+                       scale: 0;
+                       description {
+                               state, "default" 0.0;
+                               rel1.relative, 0.0 0.1;
+                               text {
+                                       font, FONT_LIGHT;
+                                       size, 32;
+                                       align, 0.5 0.2653;
+                               }
+                               color, COLOR_TEXT_ITEM;
+                       }
+                       description {
+                               state, "focused" 0.0;
+                               inherit, "default" 0.0;
+                               color, COLOR_TEXT_FOCUS;
+                       }
+                       description {
+                               state, "disabled" 0.0;
+                               inherit, "default" 0.0;
+                               color, COLOR_TEXT_DISABLE;
+                       }
+                       description {
+                               state, "mouse_down" 0.0;
+                               inherit, "default" 0.0;
+                               color, 255 255 255 255;
+                       }
+               }
+       }
+}
 group {
        name, "elm/button/base/style.datetime.status.button";
        inherit, "elm/button/base/style.status.button";
index a5a0416..ef61af9 100755 (executable)
@@ -221,8 +221,8 @@ static bool _add_clock_setting(clock_view_priv_data *priv)
 
        /* TODO: For some reason, setting ampm to visible corrects the widget's layout
                 without displaying AM/PM - remove it when datetime is fixed */
-       priv->date_part = utils_add_button(priv->base, PART_MAIN_ITEM_DATE, "elm/button/base/style.normal.button", NULL);
-       priv->time_part = utils_add_button(priv->base, PART_MAIN_ITEM_TIME, "elm/button/base/style.normal.button", NULL);
+       priv->date_part = utils_add_button(priv->base, PART_MAIN_ITEM_DATE, "style.date_time.button", NULL);
+       priv->time_part = utils_add_button(priv->base, PART_MAIN_ITEM_TIME, "style.date_time.button", NULL);
 
        /* 24/12h check: */
        priv->check_24 = elm_check_add(priv->base);