From f66d0aa5d0e85f5db79db80fd7d26cdbb804476f Mon Sep 17 00:00:00 2001 From: Michal Skorupinski Date: Mon, 10 Apr 2017 16:22:05 +0200 Subject: [PATCH] [GUI] Datetime widget style updated. Change-Id: I82cdf0095e2a8425bd04b2978dccae77a322c816 Signed-off-by: Michal Skorupinski --- res/settings-theme.edc | 20 ++ res/view/system/clock.edc | 4 +- res/widget/spinner.edc | 700 +++++++++++++++++++++++++++++++++++++++++++ src/view/system/view_clock.c | 78 ++++- 4 files changed, 796 insertions(+), 6 deletions(-) create mode 100644 res/widget/spinner.edc diff --git a/res/settings-theme.edc b/res/settings-theme.edc index 5254e80..38f3124 100644 --- a/res/settings-theme.edc +++ b/res/settings-theme.edc @@ -19,6 +19,25 @@ #include "../include/layout/picture.h" #include "../include/layout/system.h" +#define DBG(part_name, r, g, b, a) \ + part { \ + name, part_name".DBG"; \ + type, RECT; \ + scale, 1; \ + description { \ + state, "default" 0.0; \ + rel1 { \ + to, part_name; \ + relative, 0.0 0.0; \ + } \ + rel2 { \ + to, part_name; \ + relative, 1.0 1.0; \ + } \ + color, r g b a; \ + } \ + } \ + collections { base_scale: APP_BASE_SCALE; #include "widget/button.edc" @@ -28,4 +47,5 @@ collections { #include "widget/gengrid_network.edc" #include "widget/entry.edc" #include "widget/radio.edc" + #include "widget/spinner.edc" } diff --git a/res/view/system/clock.edc b/res/view/system/clock.edc index 3875dad..d2b0842 100755 --- a/res/view/system/clock.edc +++ b/res/view/system/clock.edc @@ -22,8 +22,8 @@ #define GUIDE_LABEL_Y1 TITLE_BG_Y2 #define GUIDE_LABEL_Y2 0.20 -#define DATE_ITEM_Y1 0.30 -#define DATE_ITEM_Y2 0.44 +#define DATE_ITEM_Y1 0.34 +#define DATE_ITEM_Y2 0.40 #define DATE_ITEM_X2 0.62 #define _24HOUR_ITEM_Y1 0.52 diff --git a/res/widget/spinner.edc b/res/widget/spinner.edc new file mode 100644 index 0000000..9a36d9e --- /dev/null +++ b/res/widget/spinner.edc @@ -0,0 +1,700 @@ +#define WIDTH 100 +#define BUTTON_HEIGHT 20 +#define TEXT_HEIGHT 60 + +#define IMAGE_ICON_UP "btn_option_arrow_sel.png" +#define IMAGE_ICON_DOWN "btn_option_arrow_sel.png" +#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0 + +group { name: "elm/button/base/spinner/increase/settings.datetime"; + data.item: "focus_highlight" "on"; + data.item: "vector_ux" "no_bg"; + data.item: "corner_radius" "10"; + images { + image: "core_icon_picker_arrow_up.png" COMP; + } + script { + public mouse_down = 0; + public multi_down = 0; + public disabled = 0; + public animate = 0; + } + parts { + part { name: "arrow.image.bg"; + type: SPACER; + scale: 0; + description { state: "default" 0.0; + align: 0.5 1.0; + min: WIDTH BUTTON_HEIGHT; + max: WIDTH BUTTON_HEIGHT; + } + } + part { name: "effect_spacer"; + type: SPACER; + description { state: "default" 0.0; + rel1.to: "arrow.image.bg"; + rel2.to: "arrow.image.bg"; + } + } + //Effect Shape Part + part { name: "tizen_vg_shape"; + type: SWALLOW; + clip_to: "tizen_vg_shape_clipper"; + scale: 0; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to: "effect_spacer"; + rel2.to: "effect_spacer"; + rel1.relative: 0.5 0.5; + rel2.relative: 0.5 0.5; + } + description { state: "ready" 0.0; + inherit: "default" 0.0; + min: 98 BUTTON_HEIGHT; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + part { name: "tizen_vg_shape_clipper"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + fixed: 1 1; + rel1.to: "tizen_vg_shape"; + rel2.to: "tizen_vg_shape"; + } + description { state: "ready" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 0 0 0 77; + } + description { state: "disabled" 0.0; + color: 0 0 0 77; + fixed: 1 1; + rel1.to: "tizen_vg_shape"; + rel2.to: "tizen_vg_shape"; + } + } + part { name: "arrow.image"; + scale: 0; + description { state: "default" 0.0; + rel1.to: "arrow.image.bg"; + rel2.to: "arrow.image.bg"; + min: WIDTH BUTTON_HEIGHT; + max: WIDTH BUTTON_HEIGHT; + color: 204 204 204 255; + image.normal: IMAGE_ICON_UP; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 204 204 204 127; + } + } + part { name: "focus_image"; + type: SPACER; + scale: 0; + description { state: "default" 0.0; + align: 0.5 0.0; + rel1.to: "arrow.image.bg"; + rel2.to: "arrow.image.bg"; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + } + } + part { name: "event"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + rel1.to: "arrow.image.bg"; + rel2.to: "arrow.image.bg"; + color: 0 0 0 0; + } + } + } + programs { + program { name: "pressed_effect"; + action: STATE_SET "ready" 0.0; + target: "tizen_vg_shape_clipper"; + target: "tizen_vg_shape"; + after: "pressed_effect2"; + } + program { name: "pressed_effect2"; + action: STATE_SET "pressed" 0.0; + target: "tizen_vg_shape_clipper"; + target: "tizen_vg_shape"; + target: "arrow.image"; + transition: GLIDE_EASE_OUT(0.15); + after: "pressed_effect3"; + } + program { name: "pressed_effect3"; + script { + set_int(animate, 0); + } + } + program { name: "delay_unpressed_effect"; + in: 0.1 0.0; + after: "unpressed_effect"; + } + program { name: "unpressed_effect"; + script { + if (get_int(disabled) == 0) { + run_program(PROGRAM:"unpressed_effect2"); + run_program(PROGRAM:"unpressed_effect3"); + } else { + run_program(PROGRAM:"disabled_effect"); + run_program(PROGRAM:"disabled_effect2"); + } + } + } + program { name: "unpressed_effect2"; + action: STATE_SET "default" 0.0; + target: "arrow.image"; + transition: GLIDE_EASE_OUT(0.45); + } + program { name: "unpressed_effect3"; + action: STATE_SET "ready" 0.0; + target: "tizen_vg_shape_clipper"; + transition: GLIDE_EASE_OUT(0.45); + after: "finished_animation"; + } + program { name: "disabled_effect"; + action: STATE_SET "disabled" 0.0; + target: "arrow.image"; + transition: GLIDE_EASE_OUT(0.45); + } + program { name: "disabled_effect2"; + action: STATE_SET "ready" 0.0; + target: "tizen_vg_shape_clipper"; + transition: GLIDE_EASE_OUT(0.45); + after: "finished_animation"; + } + program { name: "finished_animation"; + action: STATE_SET "default" 0.0; + target: "tizen_vg_shape_clipper"; + target: "tizen_vg_shape"; + } + program { name: "pressed"; + signal: "mouse,down,1*"; + source: "event"; + script { + if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { + stop_program(PROGRAM:"delay_unpressed_effect"); + set_int(mouse_down, 1); + set_int(animate, 1); + emit("elm,action,press", ""); + run_program(PROGRAM:"pressed_effect"); + } + } + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event"; + script { + if (get_int(mouse_down) == 1) { + set_int(mouse_down, 0); + if (get_int(disabled) == 0) { + if (get_int(animate) == 0) { + run_program(PROGRAM:"unpressed_effect"); + } else { + set_state(PART:"tizen_vg_shape", "pressed", 0.0); + set_state(PART:"tizen_vg_shape_clipper", "pressed", 0.0); + set_state(PART:"arrow.image", "pressed", 0.0); + set_int(animate, 0); + run_program(PROGRAM:"delay_unpressed_effect"); + } + emit("elm,action,unpress", ""); + } + } + } + } + program { name: "button_click"; + signal: "mouse,clicked,1"; + source: "event"; + script { + if ((get_int(multi_down) == 0) && (get_int(disabled) == 0)) { + run_program(PROGRAM:"play_sound"); + run_program(PROGRAM:"button_click2"); + } + } + } + program { name: "play_sound"; + action: RUN_PLUGIN "touch_sound"; + } + program { name: "longpress_sound"; + signal: "elm,action,longpress"; + source: "elm"; + action: RUN_PLUGIN "touch_haptic"; + } + program { name: "button_click2"; + in: 0.001 0.0; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "action_focus"; + signal: "elm,action,focus_highlight,show"; + source: "elm"; + action: STATE_SET "focused" 0.0; + target: "focus_image"; + } + program { name: "action_unfocus"; + signal: "elm,action,focus_highlight,hide"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "focus_image"; + } + program { name: "access_pressed"; + signal: "elm,action,anim,activate"; + source: "elm"; + after: "pressed_effect"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + script { + set_int(disabled, 1); + if (get_int(animate) == 1) return; + set_state(PART:"arrow.image", "disabled", 0.0); + } + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + script { + set_int(disabled, 0); + set_state(PART:"arrow.image", "default", 0.0); + } + } + program { + name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program { + name: "multi_up"; + signal: "elm,action,multi,up"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + program { name: "pass_event_enable"; + signal: "elm,event,pass,enabled"; + source: "elm"; + script { + set_mouse_events(PART:"event", 0); + } + } + program { name: "pass_event_disable"; + signal: "elm,event,pass,disabled"; + source:"elm"; + script { + set_mouse_events(PART:"event", 1); + } + } + program { name: "repeat_event_enable"; + signal: "elm,event,repeat,enabled"; + source: "elm"; + script { + set_repeat_events(PART:"event", 1); + } + } + program { name: "repeat_event_disable"; + signal: "elm,event,repeat,disabled"; + source:"elm"; + script { + set_repeat_events(PART:"event", 0); + } + } + } +} + +group { name: "elm/button/base/spinner/decrease/settings.datetime"; + inherit: "elm/button/base/spinner/increase/settings.datetime"; + images { + image: "core_icon_picker_arrow_down.png" COMP; + } + parts { + part { name: "arrow.image.bg"; + type: SPACER; + scale: 0; + description { state: "default" 0.0; + align: 0.5 0.0; + min: WIDTH BUTTON_HEIGHT; + max: WIDTH BUTTON_HEIGHT; + } + } + part { name: "arrow.image"; + scale: 0; + description { state: "default" 0.0; + rel1.to: "arrow.image.bg"; + rel2.to: "arrow.image.bg"; + min: WIDTH BUTTON_HEIGHT; + max: WIDTH BUTTON_HEIGHT; + color: 204 204 204 255; + image.normal: IMAGE_ICON_DOWN; + map { + on: 1; + rotation.z : 180; + } + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color: 204 204 204 127; + } + } + } +} + +group { name: "elm/button/base/spinner/settings.datetime"; + data.item: "focus_highlight" "on"; + script { + public mouse_down = 0; + public multi_down = 0; + } + parts { + part { name: "bg"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: WIDTH TEXT_HEIGHT; + } + } + part { name: "elm.text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 0 TEXT_HEIGHT; + max: -1 TEXT_HEIGHT; + fixed: 1 1; + color: 0 0 0 255; + rel1.to: "bg"; + rel2.to: "bg"; + text { + font: "Tizen:style=Light"; + size: 72; + text_class: "tizen"; + ellipsis: -1.0; + } + } + description { state: "pressed" 0.0; + inherit: "default" 0.0 ; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0 ; + } + } + part { name: "focus_image"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1.to: "bg"; + rel2.to: "bg"; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + } + } + part { name: "over"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "button_press"; + signal: "mouse,down,1*"; + source: "over"; + script { + if ((get_int(multi_down) == 0) && + (get_int(mouse_down) == 0)) { + set_int(mouse_down, 1); + run_program(PROGRAM:"button_press2"); + } + } + } + program { name: "button_press2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "action_pressed"; + } + program { name: "button_unpress"; + signal: "mouse,up,1*"; + source: "over"; + script { + if (get_int(mouse_down) == 1) { + set_int(mouse_down, 0); + run_program(PROGRAM:"button_unpress2"); + } + } + } + program { name: "button_unpress2"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + after: "action_unpressed"; + } + program { name: "button_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + if (get_int(multi_down) == 0) { + run_program(PROGRAM:"play_sound"); + run_program(PROGRAM:"button_click2"); + } + } + } + program { name: "play_sound"; + action: RUN_PLUGIN "touch_sound"; + } + program { name: "button_click2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "action_pressed"; + action: STATE_SET "pressed" 0.0; + target: "elm.text"; + } + program { name: "action_unpressed"; + action: STATE_SET "default" 0.0; + target: "elm.text"; + } + program { name: "action_focus"; + signal: "elm,action,focus_highlight,show"; + source: "elm"; + action: STATE_SET "focused" 0.0; + target: "focus_image"; + } + program { name: "action_unfocus"; + signal: "elm,action,focus_highlight,hide"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "focus_image"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disabler"; + target: "elm.text"; + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disabler"; + target: "elm.text"; + } + program { + name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program { + name: "multi_up"; + signal: "elm,action,multi,up"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + program { name: "pass_event_enable"; + signal: "elm,event,pass,enabled"; + source: "elm"; + script { + set_mouse_events(PART:"over", 0); + set_mouse_events(PART:"disabler", 0); + } + } + program { name: "pass_event_disable"; + signal: "elm,event,pass,disabled"; + source:"elm"; + script { + set_mouse_events(PART:"over", 1); + set_mouse_events(PART:"disabler", 1); + } + } + program { name: "repeat_event_enable"; + signal: "elm,event,repeat,enabled"; + source: "elm"; + script { + set_repeat_events(PART:"over", 1); + set_repeat_events(PART:"disabler", 1); + } + } + program { name: "repeat_event_disable"; + signal: "elm,event,repeat,disabled"; + source:"elm"; + script { + set_repeat_events(PART:"over", 0); + set_repeat_events(PART:"disabler", 0); + } + } + } +} + + +group { name: "elm/spinner/base/settings.datetime"; + parts { + part { name: "bg"; + type: SPACER; + scale: 0; + description { state: "default" 0.0; + } + } + part { name: "access"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + fixed: 1 1; + color: 0 0 0 0; + rel1.to: "bg"; + rel2.to: "bg"; + visible: 1; + } + description { state: "active" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "elm.swallow.inc_button"; + type: SWALLOW; + scale: 0; + description { state: "default" 0.0; + align: 0.5 1.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 0.0; + rel2.to: "elm.swallow.text_button"; + } + } + part { name: "elm.swallow.dec_button"; + type: SWALLOW; + scale: 0; + description { state: "default" 0.0; + align: 0.5 0.0; + rel1.relative: 0.0 1.0; + rel1.to: "elm.swallow.text_button"; + rel2.relative: 1.0 1.0; + } + } + part { name: "elm.swallow.text_button"; + type: SWALLOW; + scale: 0; + description { state: "default" 0.0; + visible: 1; + min: 0 TEXT_HEIGHT; + max: -1 TEXT_HEIGHT; + } + description { state: "inactive" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "elm.swallow.entry"; + type: SWALLOW; + description { state: "default" 0.0; + visible: 0; + rel1.to: "elm.swallow.text_button"; + rel2.to: "elm.swallow.text_button"; + min: 0 TEXT_HEIGHT; + max: -1 TEXT_HEIGHT; + fixed: 1 1; + } + description { state: "active" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "entry_active"; + signal: "elm,state,entry,active"; + source: "elm"; + action: STATE_SET "active" 0.0; + target: "elm.swallow.entry"; + } + program { name: "entry_inactive"; + signal: "elm,state,entry,inactive"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.entry"; + } + program { name: "text_button_active"; + signal: "elm,state,button,active"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.text_button"; + } + program { name: "text_button_inactive"; + signal: "elm,state,button,inactive"; + source: "elm"; + action: STATE_SET "inactive" 0.0; + target: "elm.swallow.text_button"; + } + program { name: "access_activate"; + signal: "elm,state,access,active"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "access"; + } + program { name: "access_inactivate"; + signal: "elm,state,access,inactive"; + source: "elm"; + action: STATE_SET "active" 0.0; + target: "access"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disabler"; + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disabler"; + } + } +} diff --git a/src/view/system/view_clock.c b/src/view/system/view_clock.c index ca53377..50bf8ff 100755 --- a/src/view/system/view_clock.c +++ b/src/view/system/view_clock.c @@ -294,6 +294,70 @@ static void _draw_setup_type_popup(clock_view_priv_data *priv) elm_object_focus_set(priv->setup_type_popup, EINA_TRUE); } +static void _set_spinner_button_style(Evas_Object *spinner) +{ + Evas_Object *button = elm_object_part_content_get(spinner, "elm.swallow.inc_button"); + elm_object_style_set(spinner, "settings.datetime"); + + button = elm_object_part_content_get(spinner, "elm.swallow.dec_button"); + elm_object_style_set(spinner, "settings.datetime"); + + button = elm_object_part_content_get(spinner, "elm.swallow.text_button"); + elm_object_style_set(spinner, "settings.datetime"); +} + +static void _dbg_datetime(Evas_Object *datetime) +{ + char *datetime_style = elm_object_style_get(datetime); + dlog_print(DLOG_INFO, LOG_TAG, "[%s:%d] DATE_TIME: STYLE: %s", __FILE__, __LINE__, datetime_style); + + int i; + for (i = 0; i < 20; ++i) { + char buf[255]; + snprintf(buf, 255, "field%d", i); + + Evas_Object *spinner = elm_object_part_content_get(datetime, buf); + if (!spinner) { + dlog_print(DLOG_ERROR, LOG_TAG, "[%s:%d] part(%s) == NULL", __FILE__, __LINE__, buf); + return; + } + + const char *spinner_style = elm_object_style_get(spinner); + Evas_Object *btn = elm_object_part_content_get(datetime, "elm.swallow.inc_button"); + const char *inc_style = elm_object_style_get(btn); + btn = elm_object_part_content_get(spinner, "elm.swallow.dec_button"); + const char *dec_style = elm_object_style_get(btn); + btn = elm_object_part_content_get(spinner, "elm.swallow.text_button"); + const char *btn_style = elm_object_style_get(btn); + + dlog_print(DLOG_INFO, LOG_TAG, "[%s:%d] Part(%s) STYLE: %s INC: %s DEC: %s BTN: %s", + __FILE__, __LINE__, + buf, + inc_style, + dec_style, btn_style, spinner_style); + } +} + + +static void _set_spinner_style(Evas_Object *datetime) +{ + int i; + for (i = 0; i < 20; ++i) { + char buf[255]; + snprintf(buf, 255, "field%d", i); + + Evas_Object *part = elm_object_part_content_get(datetime, buf); + if (!part) { + dlog_print(DLOG_ERROR, LOG_TAG, "[%s:%d] part(%s) == NULL", __FILE__, __LINE__, buf); + continue; + } + + elm_spinner_editable_set(part, EINA_FALSE); + elm_object_style_set(datetime, "settings.datetime"); + _set_spinner_button_style(part); + } +} + static bool _add_clock_setting(clock_view_priv_data *priv) { SETTING_TRACE_BEGIN @@ -333,6 +397,10 @@ static bool _add_clock_setting(clock_view_priv_data *priv) without displaying AM/PM - remove it when datetime is fixed */ priv->date_part = utils_add_datetime(priv->base, PART_MAIN_ITEM_DATE, EINA_TRUE, EINA_TRUE, EINA_TRUE, EINA_FALSE, EINA_FALSE, EINA_FALSE, NULL); + + _set_spinner_style(priv->date_part); + _dbg_datetime(priv->date_part); + settings_clock_set_min_max(priv->date_part); elm_object_style_set(priv->date_part, "date_layout"); @@ -352,6 +420,8 @@ static bool _add_clock_setting(clock_view_priv_data *priv) priv->time_part = utils_add_datetime(priv->base, PART_MAIN_ITEM_TIME, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_TRUE, EINA_TRUE, EINA_TRUE, NULL); + _set_spinner_style(priv->time_part); + _dbg_datetime(priv->time_part); inputmgr_add_callback(done, INPUT_HANDLER_TYPE_BTN_DONE, &done_btn_handler, priv); inputmgr_add_callback(cancel, INPUT_HANDLER_TYPE_BTN_CANCEL, &cancel_btn_handler, priv); @@ -469,10 +539,10 @@ static void _show(void *data) elm_check_state_set(priv->check_24, h24); if (h24) { - elm_object_style_set(priv->time_part, "time_layout_24hr"); +// elm_object_style_set(priv->time_part, "time_layout_24hr"); elm_datetime_format_set(priv->time_part, "%d/%b/%Y %H:%M"); } else { - elm_object_style_set(priv->time_part, "time_layout"); +// elm_object_style_set(priv->time_part, "time_layout"); elm_datetime_format_set(priv->time_part, "%d/%b/%Y %I:%M %p"); } @@ -656,10 +726,10 @@ static void _h_24_12_changed_cb(int id, void *data, Evas_Object *check_24) state = elm_check_state_get(check_24); if (state) {/*24h*/ - elm_object_style_set(priv->time_part, "time_layout_24hr"); +// elm_object_style_set(priv->time_part, "time_layout_24hr"); elm_datetime_format_set(priv->time_part, "%d/%b/%Y %H:%M"); } else { - elm_object_style_set(priv->time_part, "time_layout"); +// elm_object_style_set(priv->time_part, "time_layout"); elm_datetime_format_set(priv->time_part, "%d/%b/%Y %I:%M %p"); } -- 2.7.4