Change position of am/pm label. Adjust fonts to match new guide.
Use system-defined style for "select all" item.
Change-Id: I51e1db323729624853a0c17fc04bdf9048b49f75
group { name: "elm/genlist/item/alarm/default";
styles {
style { name: "font1_normal";
- base: "font=Tizen:style=Light color=#000000FF font_size=70 ellipsis=1.0";
- tag: "meridiem" "+ font_size=45";
+ base: "font=Tizen:style=Thin color=#000000FF font_size=70 ellipsis=1.0";
}
style {
name: "font1_dim";
- base: "font=Tizen:style=Light color=#00000028 font_size=70 ellipsis=1.0";
- tag: "meridiem" "+ font_size=45";
+ base: "font=Tizen:style=Thin color=#00000066 font_size=70 ellipsis=1.0";
+ }
+ style {
+ name: "font2_normal";
+ base: "font=Tizen:style=Light color=#000000FF font_size=36";
+ }
+ style {
+ name: "font2_dim";
+ base: "font=Tizen:style=Light color=#00000066 font_size=36";
}
style {
name: "font3_normal";
tag: "off" "+ color=#b3b3b366";
}
}
- data.item: "texts" "time meridiem name weekflags";
+ data.item: "texts" "time name weekflags ampm";
data.item: "contents" "onoff";
data.item: "banded_bg_area" "elm.swallow.bg";
parts {
rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.top"; }
rel2.to: "base";
text.style: "font1_normal";
+ text.min: 1 0;
+ text.max: 1 0;
}
desc { "disabled";
inherit: "default";
text.style: "font1_dim";
}
}
- spacer { "padding.right"; scale;
+ spacer { "padding.time.ampm"; scale;
+ desc { "default";
+ min: 10 (26+9);
+ max: 10 (26+9);
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "time"; }
+ rel2 { relative: 1.0 1.0; to: "base"; }
+ }
+ }
+ textblock { "ampm"; scale;
+ desc { "default";
+ fixed: 1 1;
+ min: 52 48;
+ max: 52 48;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to: "padding.time.ampm"; }
+ rel2 { relative: 1.0 1.0; to: "base"; }
+ text.style: "font2_normal";
+ }
+ desc { "disabled";
+ inherit: "default";
+ text.style: "font2_dim";
+ }
+ }
+ spacer { "area.onoff.right"; scale;
desc { "default";
fixed: 1 0;
- min: 32 0;
- max: 32 -1;
+ min: 104 0;
+ max: 104 -1;
align: 1.0 0.5;
rel1.to: "base";
rel2.to: "base";
swallow { "onoff"; scale;
desc { "default";
fixed: 1 1;
- align: 1.0 0.5;
- min: 80 80;
- max: 80 80;
- rel1.to: "base";
- rel2 { relative: 0.0 1.0; to: "padding.right"; }
+ align: 0.0 0.5;
+ min: 72 72;
+ max: 72 72;
+ rel1.to: "area.onoff.right";
+ rel2.to: "area.onoff.right";
}
}
spacer { "spacer.name.week"; scale;
fixed: 1 1;
min: (268+32) 86;
max: (268+32) 86;
- align: 1.0 1.0;
+ align: 1.0 0.5;
rel1.to: "base";
- rel2 { relative: 0.0 1.0; to: "onoff"; }
+ rel2 { relative: 0.0 1.0; to: "area.onoff.right"; }
}
}
textblock { "weekflags"; scale;
target: "name";
target: "weekflags";
target: "time";
+ target: "ampm";
after: "enable,repeat";
}
program { "disabled";
target: "name";
target: "weekflags";
target: "time";
+ target: "ampm";
after: "disable,repeat";
}
program { "show,repeat,icon";
target: "repeat";
}
}
- group { name: "elm/genlist/item/select_all/default";
- styles {
- style { name: "font_normal";
- base: "font=Tizen:style=Light color=#000000FF font_size=40 ellipsis=1.0";
- }
- }
- data.item: "texts" "elm.text";
- data.item: "contents" "sw.check";
- data.item: "banded_bg_area" "elm.swallow.bg";
+ group { name: "elm/genlist/item/alarm_delete/default";
+ inherit: "elm/genlist/item/alarm/default";
parts {
- spacer { "base"; scale;
- desc { "default";
- min: 0 120;
- }
- }
- swallow { "elm.swallow.bg";
- desc { "default";
- rel1.to: "base";
- rel2.to: "base";
- }
- }
- spacer { "padding.left"; scale;
- desc { "default";
- fixed: 1 0;
- min: 32 0;
- max: 32 -1;
- align: 0.0 0.5;
- rel1.to: "base";
- rel2.to: "base";
- }
- }
- spacer { "padding.right"; scale;
- desc { "default";
- fixed: 1 0;
- min: 32 0;
- max: 32 -1;
- align: 1.0 0.5;
- rel1.to: "base";
- rel2.to: "base";
- }
- }
- textblock { "elm.text"; scale;
- desc { "default";
- fixed: 0 1;
- min: 0 93;
- max: -1 93;
- rel1 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "base"; }
- rel2.to: "base";
- text.style: "font_normal";
- }
- }
- swallow { "sw.check"; scale;
+ swallow { "onoff"; scale;
desc { "default";
fixed: 1 1;
- align: 1.0 0.5;
- min: 80 80;
- max: 80 80;
- rel1.to: "base";
- rel2 { relative: 0.0 1.0; to: "padding.right"; }
+ align: 0.5 0.5;
+ min: 50 50;
+ max: 50 50;
+ rel1.to: "area.onoff.right";
+ rel2.to: "area.onoff.right";
}
}
}
formatted_time << time.Format(Time::FORMAT_TIME_24H);
} else {
formatted_time << time.Format(Time::FORMAT_TIME_12H);
- formatted_time << " <meridiem>";
+ }
+
+ return strdup(formatted_time.str().c_str());
+}
+
+static char *Ampm2FormattedString(const Time &time)
+{
+ std::stringstream formatted_time;
+
+ if (SystemSettings::Is24HourFormatPrefered()) {
+ return nullptr;
+ }
+ else {
formatted_time << time.Format(Time::FORMAT_TIME_AMPM);
- formatted_time << "</meridiem>";
}
return strdup(formatted_time.str().c_str());
return strdup(id->name);
if (!strcmp(part, "time"))
return Time2FormattedString(id->time);
+ if (!strcmp(part, "ampm"))
+ return Ampm2FormattedString(id->time);
if (!strcmp(part, "weekflags"))
return WeekFlag2FormattedString(id->flags);
formatted_time << time.Format(Time::FORMAT_TIME_24H);
} else {
formatted_time << time.Format(Time::FORMAT_TIME_12H);
- formatted_time << " <meridiem>";
+ }
+
+ return strdup(formatted_time.str().c_str());
+}
+
+static char *Ampm2FormattedString(const Time &time)
+{
+ std::stringstream formatted_time;
+
+ if (SystemSettings::Is24HourFormatPrefered()) {
+ return nullptr;
+ }
+ else {
formatted_time << time.Format(Time::FORMAT_TIME_AMPM);
- formatted_time << "</meridiem>";
}
return strdup(formatted_time.str().c_str());
Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
Elm_Genlist_Item *it;
- itc->item_style = "select_all";
+ itc->item_style = "type1";
itc->func.text_get = [](void *data, Evas_Object *obj, const char *part) -> char* {
if (!strcmp(part, "elm.text")) {
return strdup(Translate::Sprintf("IDS_COM_BODY_SELECT_ALL").c_str());
};
itc->func.content_get = [](void *data, Evas_Object *obj, const char *part) -> Evas_Object* {
DeleteAlarmView *view = static_cast<DeleteAlarmView*>(data);
- if (!strcmp(part, "sw.check")) {
+ if (!strcmp(part, "elm.swallow.end")) {
view->all_selected_check_ = elm_check_add(obj);
elm_check_state_set(view->all_selected_check_, view->all_selected_);
elm_object_focus_allow_set(view->all_selected_check_, EINA_FALSE);
data->selected = false;
itc = elm_genlist_item_class_new();
- itc->item_style = "alarm";
+ itc->item_style = "alarm_delete";
itc->func.content_get = [](void *data, Evas_Object *obj, const char *part) -> Evas_Object* {
ItemData *id = static_cast<ItemData*>(data);
if (!strcmp(part, "onoff")) {
return strdup(id->name);
if (!strcmp(part, "time"))
return Time2FormattedString(id->time);
+ if (!strcmp(part, "ampm"))
+ return Ampm2FormattedString(id->time);
if (!strcmp(part, "weekflags"))
return WeekFlag2FormattedString(id->flags);
return NULL;