From 56e42442ff844842efca1e4fe49543414e6dc341 Mon Sep 17 00:00:00 2001 From: sumanth Date: Tue, 19 Mar 2013 16:26:58 +0530 Subject: [PATCH 1/1] [datetime label styles] Datetime individual field label styles are added - year, month, date fields have default separators as per GUI v4.2 Change-Id: Ie88084a5ff53293e38c51a6c64f8a5006302c315 --- themes/inc/tizen-hd-inc.edc | 5 +++ themes/widgets/button.edc | 3 +- themes/widgets/datetime.edc | 76 ++++++++++++++++++++++-------------- themes/widgets/label.edc | 95 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 145 insertions(+), 34 deletions(-) diff --git a/themes/inc/tizen-hd-inc.edc b/themes/inc/tizen-hd-inc.edc index 9761c85..7e4af64 100644 --- a/themes/inc/tizen-hd-inc.edc +++ b/themes/inc/tizen-hd-inc.edc @@ -1032,6 +1032,11 @@ #define DATETIME_TEXT_SELECTED_COLOR_INC 255 255 255 255 #define DATETIME_LABEL_TEXT_BLOCK_STYLE_COLOR_INC 0 0 0 255 #define DATETIME_LABEL_TEXT_BLOCK_STYLE_SELECTED_COLOR_INC 59 115 182 255 +#define DATETIME_LABEL_SEPARATOR1_COLOR_INC 211 209 203 255 +#define DATETIME_LABEL_SEPARATOR2_COLOR_INC 255 255 255 255 +#define DATETIME_LABEL_SEPARATOR_SIZE_INC 1 42 +#define DATETIME_LABEL_DATE_FIELD_SIZE_INC 130 112 +#define DATETIME_LABEL_TIME_FIELD_MIN_SIZE 65 112 #define COLORSELECTOR_MIN_W_INC 688 #define COLORSELECTOR_MIN_H_INC 336 diff --git a/themes/widgets/button.edc b/themes/widgets/button.edc index 4c8be92..ba8ac47 100644 --- a/themes/widgets/button.edc +++ b/themes/widgets/button.edc @@ -553,7 +553,8 @@ } ////////////////////////////////////////////////////////////////////////////////////// - group { name: "elm/button/base/datetime_ampm/default"; + group { name: "elm/button/base/datetime/ampm/default"; + alias: "elm/button/base/datetime_ampm/default"; inherit: "elm/button/base/style1/auto_expand"; parts { part { name: "button_image"; diff --git a/themes/widgets/datetime.edc b/themes/widgets/datetime.edc index 300f64f..1737e7d 100644 --- a/themes/widgets/datetime.edc +++ b/themes/widgets/datetime.edc @@ -20,7 +20,7 @@ // datetime /////////////////////////////////////////////////////////////////////////////// -#define DATETIME_FIELD(_pos) \ +#define DATETIME_FIELD(_pos, _after) \ part {\ name: "field"#_pos; \ type: SWALLOW; \ @@ -34,11 +34,11 @@ fixed: 1 1;\ rel1 {\ relative: 1.0 0.0;\ - to: "separator"#_pos;\ + to: "separator"#_after;\ }\ rel2 {\ relative: 1.0 1.0;\ - to: "separator"#_pos;\ + to: "separator"#_after;\ }\ }\ description { state: "enable" 0.0;\ @@ -64,7 +64,7 @@ }\ } -#define DATETIME_SEPARATOR(_pos,_after) \ +#define DATETIME_SEPARATOR(_pos) \ part {\ name: "separator"#_pos; \ type: TEXT;\ @@ -75,15 +75,16 @@ state: "default" 0.0;\ visible: 0;\ min: 0 0;\ + max: 0 99999;\ align: 0.0 0.5;\ fixed: 1 1;\ rel1 {\ relative: 1.0 0.0;\ - to: "field"#_after;\ + to: "field"#_pos;\ }\ rel2 {\ relative: 1.0 1.0;\ - to: "field"#_after;\ + to: "field"#_pos;\ }\ color: DATETIME_SEPARATOR_TEXT_COLOR_INC;\ text {\ @@ -102,14 +103,14 @@ programs {\ program {\ name: "separator"#_pos",enabled";\ - signal: "field"#_after",enable";\ + signal: "field"#_pos",enable";\ source: "elm";\ action: STATE_SET "enable" 0.0;\ target: "separator"#_pos;\ }\ program {\ name: "separator"#_pos",disabled";\ - signal: "field"#_after",disable";\ + signal: "field"#_pos",separator,disable";\ source: "elm";\ action: STATE_SET "default" 0.0;\ target: "separator"#_pos;\ @@ -129,45 +130,46 @@ group { name: "elm/datetime/base/default"; } } part { - name: "separator0"; - type: RECT; + name: "field0"; + type: SWALLOW; scale: 1; + clip_to: "clipper"; + repeat_events: 1; description { state: "default" 0.0; visible: 0; min: 0 0; align: 0.0 0.5; fixed: 1 0; + rel1.to: "bg"; rel2 { relative: 0.0 1.0; to: "bg"; } } + description { state: "enable" 0.0; + inherit: "default" 0.0; + visible: 1; + min: DATETIME_FIELD_MIN_SIZE_INC; + } } - DATETIME_FIELD(0) - DATETIME_SEPARATOR(1,0) - DATETIME_FIELD(1) - DATETIME_SEPARATOR(2,1) - DATETIME_FIELD(2) - DATETIME_SEPARATOR(3,2) - DATETIME_FIELD(3) - DATETIME_SEPARATOR(4,3) - DATETIME_FIELD(4) - DATETIME_SEPARATOR(5,4) - DATETIME_FIELD(5) - DATETIME_SEPARATOR(6,5) + DATETIME_SEPARATOR(0) + DATETIME_FIELD(1, 0) + DATETIME_SEPARATOR(1) + DATETIME_FIELD(2, 1) + DATETIME_SEPARATOR(2) + DATETIME_FIELD(3, 2) + DATETIME_SEPARATOR(3) + DATETIME_FIELD(4, 3) + DATETIME_SEPARATOR(4) + DATETIME_FIELD(5, 4) + DATETIME_SEPARATOR(5) part { name: "clipper"; type: RECT; description { state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - to: "separator0"; - } - rel2 { - relative: 1.0 1.0; - to: "separator6"; - } + rel1.to: "field0"; + rel2.to: "separator5"; color: 255 255 255 255; } description { state: "visible" 0.0; @@ -205,5 +207,19 @@ group { name: "elm/datetime/base/default"; target: "disabler"; target: "clipper"; } + program { + name: "field0,enabled"; + signal: "field0,enable"; + source: "elm"; + action: STATE_SET "enable" 0.0; + target: "field0"; + } + program { + name: "field0,disabled"; + signal: "field0,disable"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "field0"; + } } } diff --git a/themes/widgets/label.edc b/themes/widgets/label.edc index 2a26d89..43b681f 100644 --- a/themes/widgets/label.edc +++ b/themes/widgets/label.edc @@ -1170,14 +1170,55 @@ base: "font=Tizen:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT } } } - group { name: "elm/label/base/datetime"; - inherit: "elm/label/base/default"; + + group { name: "elm/label/base/datetime/year/default"; + alias: "elm/label/base/datetime/month/default"; + alias: "elm/label/base/datetime/date/default"; + alias: "elm/label/base/datetime"; parts { part { name: "bg"; type: RECT; scale: 1; description { state: "default" 0.0; color: 0 0 0 0; + min: DATETIME_LABEL_DATE_FIELD_SIZE_INC; + } + } + part { name: "label.text.clip"; + type: RECT; + description { state: "default" 0.0; + } + } + part { name: "right_separator1"; + type: RECT; + scale: 1; + clip_to: "label.text.clip"; + description { state: "default" 0.0; + color: DATETIME_LABEL_SEPARATOR1_COLOR_INC; + min: DATETIME_LABEL_SEPARATOR_SIZE_INC; + max: DATETIME_LABEL_SEPARATOR_SIZE_INC; + fixed: 1 1; + rel1.to: "right_separator2"; + rel2 { + relative: 0.0 1.0; + to: "right_separator2"; + } + align: 1.0 0.5; + } + } + part { name: "right_separator2"; + type: RECT; + scale: 1; + clip_to: "label.text.clip"; + description { state: "default" 0.0; + color: DATETIME_LABEL_SEPARATOR2_COLOR_INC; + min: DATETIME_LABEL_SEPARATOR_SIZE_INC; + max: DATETIME_LABEL_SEPARATOR_SIZE_INC; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "bg"; + } } } part { name: "elm.text"; @@ -1185,12 +1226,17 @@ base: "font=Tizen:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT scale: 1; clip_to: "label.text.clip"; description { state: "default" 0.0; - color: DATETIME_LABEL_TEXT_BLOCK_STYLE_COLOR_INC; + color: DATETIME_LABEL_TEXT_BLOCK_STYLE_COLOR_INC; + rel2 { + relative: 0.0 1.0; + to_x: "right_separator1"; + } text { font: "Tizen:style=Regular"; size: DATETIME_TEXT_FONT_SIZE_INC; text_class: "tizen"; min: 1 0; + max: 1 1; } } description { state: "selected" 0.0; @@ -1214,3 +1260,46 @@ base: "font=Tizen:style=Medium font_size="LABEL_FONT_SIZE_INC" color="LABEL_TEXT } } } + + group { name: "elm/label/base/datetime/hour/default"; + alias: "elm/label/base/datetime/minute/default"; + inherit: "elm/label/base/datetime/year/default"; + parts { + part { name: "bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + min: DATETIME_LABEL_TIME_FIELD_MIN_SIZE; + } + } + part { name: "right_separator1"; + type: RECT; + scale: 1; + clip_to: "label.text.clip"; + description { state: "default" 0.0; + visible: 0; + min: 0 0; + max: 0 0; + fixed: 1 1; + rel1.to: "right_separator2"; + rel2.to: "right_separator2"; + } + } + part { name: "right_separator2"; + type: RECT; + scale: 1; + clip_to: "label.text.clip"; + description { state: "default" 0.0; + visible: 0; + min: 0 0; + max: 0 0; + fixed: 1 1; + rel1 { + relative: 1.0 0.0; + to: "bg"; + } + } + } + } + } -- 2.7.4