Current month text was not displayed at Calendar widget. Fixed according to GUI. 85/99385/4
authorNataliia Sydorchuk <n.sydorchuk@samsung.com>
Wed, 23 Nov 2016 09:26:44 +0000 (11:26 +0200)
committerAleksandr Sapozhnik <a.sapozhnik@samsung.com>
Thu, 24 Nov 2016 15:23:06 +0000 (07:23 -0800)
Change-Id: I2315407e1af15e9b8adf0c4d77240320aa37f69b
Signed-off-by: Nataliia Sydorchuk <n.sydorchuk@samsung.com>
main-app/res/edje/inc/CalMonthControl.Header.edc
main-app/res/edje/inc/CalMonthRowControl.edc
main-app/res/edje/inc/WidgetLayout.edc
main-app/res/edje/inc/common.edc
main-app/res/edje/theme/inc/WVGA-inc.edc
widget/CalWidget.cpp
widget/CalWidget.h

index 5b06af4..5dedecd 100644 (file)
                }\
                part {\
                        name: "cell/"_column"/weekday";\
-                       type: TEXT;\
+                       type: TEXTBLOCK;\
                        scale: 1;\
                        mouse_events: 0;\
                        effect: SHADOW; \
                        description {\
                                state: "default" 0.0;\
                                POS_CENTER_WITH_SIZE("cell/"_column, 101, 70)\
-                               color: 255 255 255 255;\
-                               color3: 100 100 100 0; \
-                               text { size: MONTH_TEXT_DAYOFWEEK_SIZE; }\
+                               text.style: "weekday_style"; \
                        }\
                        description {\
                                state: "focus" 0.0;\
                                inherit: "default" 0.0;\
-                               color: 255 255 255 255;\
-                               text { size: MONTH_TEXT_DAYOFWEEK_SIZE; }\
                                /*Remove hight light state: color_class: "ATO002";*/\
                        }\
                        description {\
                                state: "timepicker" 0.0;\
                                inherit: "default" 0.0;\
                                color: 0 0 0 128; \
-                               text { size: MONTH_TEXT_DAYOFWEEK_SIZE; }\
                        }\
                        description {\
                                state: "widget" 0.0;\
                                inherit: "default" 0.0;\
-                               color: 255 255 255 255; \
-                               color3: 100 100 100 128; \
-                               text { size: MONTH_TEXT_DAYOFWEEK_SIZE; }\
                        }\
                }
 
                        target, "cell/"_col"/weekday";\
                }\
 
+styles {
+       style {
+               name: "weekday_style";
+               base: "font=Tizen:style=Light font_size=34 align=center color=#FAFAFA style=far_shadow,bottom shadow_color=#00000033 wrap=mixed ellipsis=1.0";
+       }
+}
+
 group {
        name: "CalMonthControl.Header";
        parts {
index 85bcc68..302dcd7 100644 (file)
 #define CELL_NUM_TEXT_PART_WIDGET(_column)\
                part {\
                        name: "cell/"_column"/daynum";\
-                       type: TEXT;\
+                       type: TEXTBLOCK;\
                        scale: 1;\
                        mouse_events: 0;\
                        effect: SHADOW; \
                        description {\
                                state: "default" 0.0;\
                                POS_CENTER_WITH_SIZE("cell/"_column, 68, 68)\
-                               color: 255 255 255 164;\
-                               color3: 100 100 100 50; \
-                               text { size: MONTH_TEXT_DEFAULT_SIZE;  }\
+                               text.style: "cell_daynum_dim_style"; \
                        }\
                        description {\
                                state: "normal" 0.0;\
                                inherit: "default" 0.0;\
-                               color: 255 255 255 255;\
-                               color3: 100 100 100 128; \
-                               text { size: MONTH_TEXT_NORMAL_SIZE;  }\
+                               text.style: "cell_daynum_style"; \
                        }\
                        description {\
                                state: "sunday" 0.0;\
                                inherit: "default" 0.0;\
-                               color: 255 255 255 255;\
-                               text { size: MONTH_TEXT_SUNDAY_SIZE;  }\
+                               text.style: "cell_daynum_style"; \
                        }\
                        description {\
                                state: "focus" 0.0;\
                                inherit: "default" 0.0;\
-                               color: 255 255 255 255;\
-                               text { size: MONTH_TEXT_TODAY_SIZE;  }\
+                               text.style: "cell_daynum_style"; \
                        }\
                }
 
         action: RUN_PLUGIN "touch_sound"; \
     }
 
+styles {
+       style {
+               name: "cell_daynum_dim_style";
+               base: "font=Tizen:style=Light font_size=42 align=center color=#FAFAFAA4 style=far_shadow,bottom shadow_color=#00000033 wrap=mixed ellipsis=1.0";
+       }
+       style {
+               name: "cell_daynum_style";
+               base: "font=Tizen:style=Light font_size=42 align=center color=#FAFAFA style=far_shadow,bottom shadow_color=#00000033 wrap=mixed ellipsis=1.0";
+       }
+}
+
 group {
        name: "CalMonthRowControl";
        parts {
index d775612..75075c5 100644 (file)
 #define BUTTONS_H 64
 #define WEEKDAYS_H 78
 
+styles {
+       style {
+               name: "month_date_style";
+               base: "font=Tizen:style=Light font_size=48 align=center color=#FAFAFA style=far_shadow,bottom shadow_color=#00000033 wrap=mixed ellipsis=1.0";
+       }
+}
+
 group { "WidgetLayout";
        parts {
                spacer { "spacer.left_top"; scale;
@@ -40,12 +47,16 @@ group { "WidgetLayout";
                                rel2.relative: 1 0;
                        }
                }
-               swallow { "widget.month.date"; scale;
+               textblock { "widget.month.date"; scale;
                        desc { "default";
                                align: 0 0;
                                min: 0 DATE_H;
                                rel1 { relative: 1 1; to: "spacer.left_top"; }
                                rel2 { relative: 1 1; to: "spacer.left_top"; }
+                               text {
+                                       style: "month_date_style";
+                                       min: 1 0;
+                               }
                        }
                }
                swallow { "widget.month.buttons"; scale;
@@ -83,43 +94,3 @@ group { "WidgetLayout";
        }
 }
 
-group {
-       name: "box_button";
-       images {
-               image: "today_button.png" COMP;
-       }
-       parts {
-               part { name: "bg";
-                       type: IMAGE;
-                       description { state: "default" 0.0;
-                       min: 54 27;
-                       color: 255 255 255 254;
-                       image {
-                               normal: "today_button.png";
-                       }
-               }
-               part { name: "elm.text";
-                       type: TEXTBLOCK;
-                       scale: 1;
-                       effect: PLAIN;
-                       description { state: "default" 0.0;
-                               visible: 1;
-                               text {
-                                       style: "empty_state_3";
-                                       min: 1 1;
-                                       max: 1 1;
-                                       ellipsis: -1.0;
-                               }
-                               rel1 {
-                                       relative: 0.0 0.0; to: "bg";
-                                       offset: 15 2;
-                               }
-                               rel2 {
-                                       relative: 1.0 1.0; to: "bg";
-                                       offset: -15 -2;
-                               }
-                       }
-               }
-       }
-}
-
index b1c0c7d..c9ce077 100644 (file)
@@ -40,8 +40,6 @@
 #define MONTH_TEXT_SUNDAY_SIZE  MONTH_TEXT_DEFAULT_SIZE
 #define MONTH_TEXT_TODAY_SIZE   MONTH_TEXT_DEFAULT_SIZE
 
-#define MONTH_TEXT_DAYOFWEEK_SIZE 36
-
 #define MASKED_MONTH_TOP_PADDING     14
 #define MASKED_MONTH_BOTTOM_PADDING (PULL_DOWN_CUE_HEIGHT + MONTH_LIST_DIVIDER_HEIGHT)
 #define MASKED_MONTH_SECTION_HEIGHT    (MONTH_ROW_HEIGHT + MASKED_MONTH_TOP_PADDING + MASKED_MONTH_BOTTOM_PADDING)
index 8d80a41..4e3b23a 100644 (file)
@@ -93,10 +93,4 @@ styles {
       STYLE_TAGS
       STYLE_TAG_MATCH
    }
-  // ************* no Content text ********** //
-   style { name: "empty_state_3";
-      base: "font=Tizen:style=Regular font_size="LIST_TEXT_MAIN_SIZE" align=center color="CAL_COLOR_T023W" wrap=mixed ellipsis=1.0";
-      STYLE_TAGS
-      STYLE_TAG_MATCH
-   }
 }
index 91add70..7e66403 100644 (file)
@@ -39,7 +39,6 @@ CalWidget::CalWidget() :
        __height(0),
        __monthCalendar(NULL),
        __buttonToday(NULL),
-       __labelMonth(NULL),
        __timer(NULL),
        __isCutomFocus(false)
 {
@@ -135,22 +134,6 @@ void CalWidget::__createCalendar()
 
        elm_object_part_content_set(layout, "widget.month.buttons", boxTop);
 
-       Evas_Object *boxLeft = elm_box_add(layout);
-       evas_object_size_hint_weight_set(boxLeft, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(boxLeft, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_box_horizontal_set(boxLeft, EINA_TRUE);
-       elm_box_homogeneous_set(boxLeft, EINA_FALSE);
-
-       __labelMonth = elm_label_add(boxLeft);
-       elm_label_ellipsis_set(__labelMonth, EINA_FALSE);
-       elm_label_line_wrap_set(__labelMonth, ELM_WRAP_NONE);
-       evas_object_show(__labelMonth);
-
-       elm_box_pack_end(boxLeft, __labelMonth);
-       evas_object_show(boxLeft);
-
-       elm_object_part_content_set(layout, "widget.month.date", boxLeft);
-
        __dateTime = CalDate(CalDate::INIT_TODAY);
        __originDate = __dateTime;
        __customFocusDate = __dateTime;
@@ -355,11 +338,8 @@ void CalWidget:: __setMonthLabel()
        std::string strMonth;
        CalLocaleManager::getInstance().getDateText(CalLocaleManager::DATEFORMAT_18, __dateTime, strMonth);
 
-       strMonth = "<p font_size=52 align=center color=#FFFFFF style=far_shadow,bottom shadow_color=#999999FF>" + strMonth + "</p>";
-       elm_object_text_set(__labelMonth, strMonth.c_str());
-
-       Evas_Object *layoutToday = elm_object_content_get(__buttonToday);
-       elm_object_domain_translatable_part_text_set(layoutToday, "elm.text", CALENDAR, "IDS_CLD_ACBUTTON_TODAY");
+       elm_object_part_text_set(elm_object_part_content_get(__conform, "elm.swallow.content"),
+                       "widget.month.date", strMonth.c_str());
 }
 
 void CalWidget::__displayCurrentDate()
index d9d7fdc..4ebe885 100644 (file)
@@ -95,7 +95,6 @@ private:
        CalDate __originDate;
        CalDate __customFocusDate;
        Evas_Object *__buttonToday;
-       Evas_Object *__labelMonth;
        Ecore_Timer *__timer;
        bool __isCutomFocus;
 };