align: 0.5 0.0;
}
}
- group { "main.locations.list"; scale;
- source: "locations.list";
+ swallow { "main.locations.list"; scale;
desc { "default";
rel1 {
relative: 0.0 1.0;
}
}
}
- group { "locations.list";
-
- styles {
- style {
- name: "ATO044";
- base: "font=Tizen:style=Regular color=#808080aa font_size=34 align=center wrap=word";
- //TODO Update it when GUI designer will reply
- }
- }
-
- parts {
- rect { "emptylist.label.bg";
- desc{ "default";
- color: 255 255 255 255;
- }
- desc { "hidden"
- hid;
- }
- }
- textblock { "emptylist.label"; scale;
- desc { "default";
- text {
- style: "ATO044";
- ellipsis: -1;
- }
- }
- desc { "hidden";
- hid;
- }
- }
- swallow { "custom.locations.list";
- desc { "default";
- vis;
- }
- desc { "hidden";
- hid;
- }
- }
- }
-
- programs {
- program {
- name: "emptylist.label.show";
- signal: "emptylist.label.show";
- source: "world_clock";
- action: STATE_SET "default";
- target: "emptylist.label";
- target: "emptylist.label.bg";
- }
-
- program {
- name: "emptylist.label.hide";
- signal: "emptylist.label.hide";
- source: "world_clock";
- action: STATE_SET "hidden";
- target: "emptylist.label";
- target: "emptylist.label.bg";
- }
- }
- }
group { "map";
parts {
evas_object_size_hint_expand_set(custom_locations_list_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(custom_locations_list_, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_genlist_homogeneous_set(custom_locations_list_, EINA_TRUE);
- elm_layout_content_set(world_clock_, TIMEZONE_CUSTOM_LOCATIONS_LIST_PART, custom_locations_list_);
}
void WorldClockView::UpdateLocationItemLanguage(LocationItemData *data)
elm_object_part_content_set(world_clock_, "main.world.map", world_clock_map_);
+ nocontent_layout_ = elm_layout_add(world_clock_);
+ if (!nocontent_layout_)
+ FAT("elm_layout_add failed");
+
+ elm_layout_theme_set(nocontent_layout_, "layout", "nocontents", "default");
+ elm_object_translatable_part_text_set(nocontent_layout_, "elm.text",
+ "IDS_CLOCK_BODY_AFTER_YOU_ADD_CITIES_THEY_WILL_BE_SHOWN_HERE");
+ elm_layout_signal_emit(nocontent_layout_, "align.center", "elm");
+ evas_object_show(nocontent_layout_);
+
CreateTimezoneDetails();
CreateCustomLocationsList(main.GetEvasObject());
language_change_listener_ = EventBus::AddListener<SystemSettings::LanguageChanged>(
std::bind(&WorldClockView::LanguageChanged, this));
-
- elm_object_translatable_part_text_set(world_clock_, "main.locations.list:emptylist.label",
- "IDS_CLOCK_BODY_AFTER_YOU_ADD_CITIES_THEY_WILL_BE_SHOWN_HERE");
}
void WorldClockView::LeftArrowButtonClickedCb(void *data, Evas_Object *obj, void *event_info)
void WorldClockView::ShowEmptyListLabel()
{
- elm_layout_signal_emit(world_clock_, "emptylist.label.show", "world_clock");
+ elm_object_part_content_unset(world_clock_, "main.locations.list");
+ elm_object_part_content_set(world_clock_, "main.locations.list", nocontent_layout_);
+ evas_object_hide(custom_locations_list_);
+ evas_object_show(nocontent_layout_);
}
void WorldClockView::HideEmptyListLabel()
{
- elm_layout_signal_emit(world_clock_, "emptylist.label.hide", "world_clock");
+ elm_object_part_content_unset(world_clock_, "main.locations.list");
+ elm_object_part_content_set(world_clock_, "main.locations.list", custom_locations_list_);
+ evas_object_hide(nocontent_layout_);
+ evas_object_show(custom_locations_list_);
}
void WorldClockView::PostItemExistMessage(const model::Location *location)