TizenRefApp-7966 Implement support of different time formats in the widget's layout 66/112766/1
authorIryna Ferenchak <i.ferenchak@samsung.com>
Thu, 2 Feb 2017 12:48:23 +0000 (14:48 +0200)
committerIryna Ferenchak <i.ferenchak@samsung.com>
Thu, 2 Feb 2017 12:48:23 +0000 (14:48 +0200)
Change-Id: Id2e46a8ce449135aa74c33940c9588657541478c
Signed-off-by: Iryna Ferenchak <i.ferenchak@samsung.com>
alarm-widget/res/widget/edje/WidgetLayout.h
alarm-widget/res/widget/edje/widget-layout.edc

index 16170bf63c0dfc181089aad2632739f20f2c00ef..65c40d2a80b9f5f477b9544e06b1073d3459977d 100644 (file)
 #define STYLE_CHECK_ALARM_ON_OFF    "alarm_on_off"
 
 #define PART_NO_ALARM_TEXT          "text.no_alarm"
-#define PART_AM_PM                  "text.am_pm"
 #define PART_TIME                   "text.time"
 #define PART_REPEAT                 "text.repeat"
 #define PART_ON_OFF                 "swallow.on_off"
+#define SIGNAL_ALARM_ENABLE         "state,alarm,enabled"
+#define SIGNAL_ALARM_DISABLE        "state,alarm,disabled"
 
 #endif /* WIDGET_LAYOUT_H */
index 099965c27f51352bae561ec64c08072d0c7a64af..7701cea02de6493d3d85ca24d7737689daa7bdc3 100644 (file)
 #define TEXT_NO_ALARM_H     42
 #define TEXT_NO_ALARM_T     16
 
-#define AM_PM_L             60
-#define AM_PM_T             96
-#define AM_PM_W             56
-#define AM_PM_H             52
-
-#define TIME_L              4
+#define TIME_L              62
 #define TIME_T              59
-#define TIME_W              180
+#define TIME_W              244
 #define TIME_H              95
 
-#define REPEAT_T            6
+#define REPEAT_T            8
 #define REPEAT_L            90
 #define REPEAT_W            180
 #define REPEAT_H            41
@@ -50,21 +45,15 @@ styles {
                name: "no_alarm_pressed_style";
                base: "font=Tizen:style=Regular font_size=32 align=center color=#ffffff66 ellipsis=-1.0";
        }
-       style {
-               name: "am_pm_style";
-               base: "font=Tizen:style=Regular font_size=40 align=center color=#ffffff ellipsis=-1.0";
-       }
-       style {
-               name: "am_pm_disabled_style";
-               base: "font=Tizen:style=Regular font_size=40 align=center color=#ffffff4C ellipsis=-1.0";
-       }
        style {
                name: "time_style";
                base: "font=Tizen:style=Thin font_size=79 align=center color=#ffffff ellipsis=-1.0";
+               tag: "match" "+font_size=40 font=Tizen:style=Regular";
        }
        style {
                name: "time_disabled_style";
                base: "font=Tizen:style=Thin font_size=79 align=center color=#ffffff4C ellipsis=-1.0";
+               tag: "match" "+font_size=40 font=Tizen:style=Regular";
        }
        style {
                name: "repeat_style";
@@ -73,8 +62,8 @@ styles {
        }
        style {
                name: "repeat_disabled_style";
-               base: "font=Tizen:style=Light font_size=28 align=center color=#9e9e9e ellipsis=-1.0";
-               tag: "match" "+color=#4dcfff"; /* FIXME: add color */
+               base: "font=Tizen:style=Light font_size=28 align=center color=#6B6B6B ellipsis=-1.0";
+               tag: "match" "+color=#4dcfff66";
        }
 }
 
@@ -168,35 +157,12 @@ collections {
 
        group { LAYOUT_ALARM;
                parts {
-                       spacer { "spacer.am_pm.left_top"; scale;
-                               desc { "default";
-                                       fixed: 1 1;
-                                       min: AM_PM_L AM_PM_T;
-                                       align: 0.0 0.0;
-                                       rel2.relative: 0.0 0.0;
-                               }
-                       }
-                       textblock { PART_AM_PM; scale;
-                               desc { "default";
-                                       fixed: 1 1;
-                                       min: AM_PM_W AM_PM_H;
-                                       align: 0.0 0.0;
-                                       rel1 { relative: 1.0 1.0; to: "spacer.am_pm.left_top"; }
-                                       rel2 { relative: 1.0 1.0; to: "spacer.am_pm.left_top"; }
-                                       text.style: "am_pm_style";
-                               }
-                               desc { "disabled";
-                                       inherit: "default";
-                                       text.style: "am_pm_disabled_style";
-                               }
-                       }
                        spacer { "spacer.time.left_top"; scale;
                                desc { "default";
                                        fixed: 1 1;
                                        min: TIME_L TIME_T;
                                        align: 0.0 0.0;
-                                       rel1 { relative: 1.0 0.0; to_x: PART_AM_PM; }
-                                       rel2 { relative: 1.0 0.0; to_x: PART_AM_PM; }
+                                       rel2.relative: 0.0 0.0;
                                }
                        }
                        textblock { PART_TIME; scale;
@@ -217,9 +183,9 @@ collections {
                                desc { "default";
                                        fixed: 1 1;
                                        min: REPEAT_L REPEAT_T;
-                                       align: 0.0 0.0;
-                                       rel1 { relative: 0.0 1.0; to_y: PART_AM_PM; }
-                                       rel2 { relative: 0.0 1.0; to_y: PART_AM_PM; }
+                                       align: 0.0 1.0;
+                                       rel1 { relative: 0.0 1.0; to_y: PART_TIME; }
+                                       rel2 { relative: 0.0 1.0; to_y: PART_TIME; }
                                }
                        }
                        textblock { PART_REPEAT; scale;
@@ -227,8 +193,8 @@ collections {
                                        fixed: 1 1;
                                        min: REPEAT_W REPEAT_H;
                                        align: 0.0 0.0;
-                                       rel1 { relative: 1.0 1.0; to: "spacer.repeat.left_top"; }
-                                       rel2 { relative: 1.0 1.0; to: "spacer.repeat.left_top"; }
+                                       rel1 { relative: 1.0 0.0; to: "spacer.repeat.left_top"; }
+                                       rel2 { relative: 1.0 0.0; to: "spacer.repeat.left_top"; }
                                        text.style: "repeat_style";
                                }
                                desc { "disabled";
@@ -254,5 +220,21 @@ collections {
                                }
                        }
                }
+               programs {
+                       program {
+                               signal: SIGNAL_ALARM_ENABLE;
+                               source: "*";
+                               action: STATE_SET "default";
+                               target: PART_TIME;
+                               target: PART_REPEAT;
+                       }
+                       program {
+                               signal: SIGNAL_ALARM_DISABLE;
+                               source: "*";
+                               action: STATE_SET "disabled";
+                               target: PART_TIME;
+                               target: PART_REPEAT;
+                       }
+               }
        }
 }