[UI] 'date' and 'time' button text styles fixed. 11/128311/1
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Mon, 8 May 2017 13:44:34 +0000 (15:44 +0200)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Mon, 8 May 2017 13:44:34 +0000 (15:44 +0200)
Change-Id: Idb4f0d59bbcfd68941bc781e9246ce0222b23a55
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
src/view/system/view_clock.c

index a32c8d2..7291db2 100755 (executable)
@@ -28,7 +28,7 @@
 #include "data/system/settings_clock.h"
 #include "app_string.h"
 
-#define DATE_TIME_FORMAT "<font=Tizen:style=Light font_size=64 align=center color=#FFF>"
+//#define DATE_TIME_FORMAT "<font=Tizen:style=Light font_size=64 align=center color=#FFF>"
 #define DEFAULT_KEYPAD_POS             636
 #define PADDING_VKEYBOARD              30
 
@@ -177,6 +177,7 @@ static input_handler cancel_btn_handler = {
 };
 
 static input_handler datetime_setup_btn_handler = {
+       .mouse_move = _auto_manual_mouse_move_cb,
        .clicked = _datetime_btn_clicked_cb,
 };
 
@@ -217,11 +218,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 = elm_button_add(priv->base);
-       elm_object_part_content_set(priv->base, PART_MAIN_ITEM_DATE, priv->date_part);
-
-       priv->time_part = elm_button_add(priv->base);
-       elm_object_part_content_set(priv->base, PART_MAIN_ITEM_TIME, priv->time_part);
+       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);
 
        /* 24/12h check: */
        priv->check_24 = elm_check_add(priv->base);
@@ -376,13 +374,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, DATE_TIME_FORMAT"%d / %b / %Y</font>", current_time);
+       strftime (ptr, 255, "%d / %b / %Y", current_time);
        elm_object_text_set(priv->date_part, ptr);
 
        if (is_24)
-               strftime (ptr, 255, DATE_TIME_FORMAT"%H : %M</font>", current_time);
+               strftime (ptr, 255, "%H : %M", current_time);
        else
-               strftime (ptr, 255, DATE_TIME_FORMAT"%I : %M %p</font>", current_time);
+               strftime (ptr, 255, "%I : %M %p", current_time);
 
        elm_object_text_set(priv->time_part, ptr);
 }