}
}
}
+ group {
+ name: "badge";
+ images {
+ image: "core_icon_badge_container.#.png" RAW; // TODO: replace image with 50x50px
+ }
+ parts
+ {
+ part{ name: "elm.image.count.bg";
+ type:IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ fixed: 0 1;
+ min: 50 50;
+ max: -1 50;
+ image {
+ normal:"core_icon_badge_container.#.png";
+ }
+ color: 0 0 0 32;
+
+ }
+ }
+ PADDING_LEFT("pad.left", 13);
+ PADDING_RIGHT("pad.right", 13);
+ part { name: "elm.text.count";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.5 0.5;
+ rel1 {
+ relative: 1.0 0.5;
+ to_x: "pad.left";
+ }
+ rel2 {
+ relative: 0.0 0.5;
+ to_x: "pad.right";
+ }
+ color: 250 250 250 255;
+ text {
+ font: "Tizen:style=Regular";
+ size: 32;
+ ellipsis: 0.0;
+ align: 0.5 0.5;
+ min: 1 0;
+ }
+ }
+ }
+ }
+ }
}
std::string decorateNameText(const std::string &text) const;
std::string decorateMessageText(const std::string &text) const;
std::string decorateTimeText(const std::string &text) const;
- std::string decorateUnreadText(const std::string &text) const;
std::string decorateFailedText(const std::string &text) const;
std::string decorateSendingText(const std::string &text) const;
std::string decorateDraftText(const std::string &text) const;
#include "ThumbnailMaker.h"
#include "ListView.h"
#include "TextDecorator.h"
+#include "Resource.h"
#include <Elementary.h>
#include <stdlib.h>
Evas_Object *ThreadListViewItem::makeUnreadIcon(const std::string &text) const
{
- Evas_Object *label = elm_label_add(*getOwner());
- evas_object_show(label);
- std::string decorText = TextDecorator::make(text, unreadTextStyle);
- elm_object_text_set(label, decorText.c_str());
- return label;
+ if(text.empty())
+ return nullptr;
+ Evas_Object *icon = View::addLayout(*getOwner(), ICONS_EDJ_PATH, "badge");
+ elm_object_part_text_set(icon, "elm.text.count", text.c_str());
+ evas_object_show(icon);
+ return icon;
}
std::string ThreadListViewItem::getStatus()
return text;
}
-std::string ThreadListViewItem::decorateUnreadText(const std::string &text) const
-{
- return TextDecorator::make(text, unreadTextStyle);
-}
-
std::string ThreadListViewItem::decorateFailedText(const std::string &text) const
{
return TextDecorator::make(text, failedTextStyle);