Incorrect buttons styles fix 72/151072/2
authorRadek Kintop <r.kintop@samsung.com>
Tue, 19 Sep 2017 13:56:15 +0000 (15:56 +0200)
committerRadek Kintop <r.kintop@samsung.com>
Tue, 19 Sep 2017 14:02:51 +0000 (16:02 +0200)
Style fixed for RESET popup buttons

Change-Id: Idba643dae71273e6a9961bed073e74f7bd25f2cf
Signed-off-by: Radek Kintop <r.kintop@samsung.com>
include/define.h
res/widget/button.edc
src/view/system/view_clock.c
src/view/system/view_reset.c

index 0515c02..631b953 100644 (file)
 #define STYLE_CTXPOPUP "style.ctxpopup"
 #define STYLE_GRID_DEFAULT "style.grid.default"
 #define STYLE_DISABLE_BTN "style.disable.button"
-#define STYLE_POPUP_BTN "style.popup.button"
 #define STYLE_POPUP "style.popup"
 #define STYLE_POPUP_PASSCODE "style.popup.passcode"
 #define STYLE_DATETIME "style.datetime"
index 049b201..38ddaa2 100755 (executable)
@@ -1142,7 +1142,7 @@ group
 #define CLOCK_SHADOW "4.0/bg_settings_clock_shadow.#.png"
 
 group {
-       name, "elm/button/base/style.date_time.button";
+       name, "elm/button/base/style.popup.button";
        inherit, "elm/button/base/style.normal.button";
        data.item, "focus_highlight" "on";
        images {
@@ -1153,7 +1153,7 @@ group {
        styles {
                style {
                        name, "style.date_time";
-                       base, "font=BreezeSans:style=Light font_size=48 color=#FFF wrap=word align=center";
+                       base, "font=BreezeSans:style=Light font_size=28 color=#FFF wrap=word align=center";
                        tag, "br" "\n";
                        tag, "sl" "+ font_size=32";
                        tag, "f28" "+ font_size=28";
@@ -1959,96 +1959,3 @@ group {
                }
        }
 }
-group {
-        name, "elm/button/base/style.popup.button";
-        inherit, "elm/button/base/style.base.button";
-        parts {
-                part {
-                        name, "elm.text";
-                        type, TEXT;
-                        scale: 0;
-                        description {
-                                state, "default" 0.0;
-                                color, 87 87 87 255;
-                                text {
-                                        font, FONT_LIGHT;
-                                        size, 28;
-                                        align, 0.5 0.5;
-                                }
-                        }
-                        description {
-                                state, "focused" 0.0;
-                                inherit, "default" 0.0;
-                                color, 255 255 255 255;
-                        }
-                        description {
-                                state, "selected" 0.0;
-                                inherit, "default" 0.0;
-                                color, 64 136 211 255;
-                        }
-                }
-
-                part {
-                        name, "part.inside.line.up";
-                        description {
-                                state, "disabled" 0.0;
-                                inherit, "default" 0.0;
-                                color, 87 87 87 127;
-                        }
-                }
-
-                part {
-                        name, "part.inside.line.down";
-                        description {
-                                state, "disabled" 0.0;
-                                inherit, "default" 0.0;
-                                color, 87 87 87 127;
-                        }
-                }
-
-                part {
-                        name, "part.inside.line.left";
-                        description {
-                                state, "disabled" 0.0;
-                                inherit, "default" 0.0;
-                                color, 87 87 87 127;
-                        }
-                }
-
-                part {
-                        name, "part.inside.line.right";
-                        description {
-                                state, "disabled" 0.0;
-                                inherit, "default" 0.0;
-                                color, 87 87 87 127;
-                        }
-                }
-        }
-
-        programs {
-                program {
-                        name, SIG_DISABLED;
-                        signal, SIG_DISABLED;
-                        source, SRC_ELM;
-                        action, STATE_SET "disabled" 0.0;
-                        target, "part.bg";
-                        target, "part.inside.line.up";
-                        target, "part.inside.line.down";
-                        target, "part.inside.line.left";
-                        target, "part.inside.line.right";
-                        target, "elm.text";
-                }
-                program {
-                        name, SIG_ENABLED;
-                        signal, SIG_ENABLED;
-                        source, SRC_ELM;
-                        action, STATE_SET "default" 0.0;
-                        target, "part.bg";
-                        target, "part.inside.line.up";
-                        target, "part.inside.line.down";
-                        target, "part.inside.line.left";
-                        target, "part.inside.line.right";
-                        target, "elm.text";
-                }
-        }
-}
index 6a11f2b..4e1a717 100755 (executable)
@@ -203,13 +203,13 @@ static bool _add_clock_setting(clock_view_priv_data *priv)
        elm_object_part_text_set(priv->base, PART_MAIN_LABEL_TIME, STR_TIME);
 
        /* Add screen bottom buttons */
-       done = utils_add_button(priv->base, PART_VIEW_BOTTOM_BTN2, "style.date_time.button", STR_BTN_DONE);
+       done = utils_add_button(priv->base, PART_VIEW_BOTTOM_BTN2, "style.popup.button", STR_BTN_DONE);
        if (!done) {
                _ERR("failed to add done btn");
                return false;
        }
 
-       cancel = utils_add_button(priv->base, PART_VIEW_BOTTOM_BTN1, "style.date_time.button", STR_BTN_CANCEL);
+       cancel = utils_add_button(priv->base, PART_VIEW_BOTTOM_BTN1, "style.popup.button", STR_BTN_CANCEL);
        if (!cancel) {
                _ERR("failed to add cancel btn");
                evas_object_del(done);
@@ -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, "style.date_time.button", NULL);
-       priv->time_part = utils_add_button(priv->base, PART_MAIN_ITEM_TIME, "style.date_time.button", NULL);
+       priv->date_part = utils_add_button(priv->base, PART_MAIN_ITEM_DATE, "style.popup.button", NULL);
+       priv->time_part = utils_add_button(priv->base, PART_MAIN_ITEM_TIME, "style.popup.button", NULL);
 
        /* 24/12h check: */
        priv->check_24 = elm_check_add(priv->base);
@@ -383,13 +383,13 @@ void _update_focus_chain(bool h24, clock_view_priv_data* priv)
 static void _set_displayed_time(clock_view_priv_data *priv, struct tm *current_time, bool is_24)
 {
        char ptr[255];
-       strftime (ptr, 255, "%d <sl>/</sl> %b <sl>/</sl> %Y", current_time);
+       strftime(ptr, 255, "%d <sl>/</sl> %b <sl>/</sl> %Y", current_time);
        elm_object_text_set(priv->date_part, ptr);
 
        if (is_24)
-               strftime (ptr, 255, "%H <sl>:</sl> %M", current_time);
+               strftime(ptr, 255, "%H <sl>:</sl> %M", current_time);
        else
-               strftime (ptr, 255, "%I <sl>:</sl> %M %p", current_time);
+               strftime(ptr, 255, "%I <sl>:</sl> %M %p", current_time);
 
        elm_object_text_set(priv->time_part, ptr);
 }
index bfacdd0..42783f3 100644 (file)
@@ -86,9 +86,11 @@ static Evas_Object *_create(Evas_Object *win, void *data)
                return NULL;
        }
 
-       priv->reset_btn = utils_add_button(priv->popup, NULL, NULL,
+       priv->reset_btn = utils_add_button(priv->popup, NULL,
+                                                                               "style.popup.button",
                                                                                "IDS_ST_BUTTON_RESET");
-       priv->cancel_btn = utils_add_button(priv->popup, NULL, NULL,
+       priv->cancel_btn = utils_add_button(priv->popup, NULL,
+                                                                               "style.popup.button",
                                                                                "IDS_ST_BUTTON_CANCEL");
        if (!priv->reset_btn || !priv->cancel_btn) {
                evas_object_del(priv->popup);