#include "macros.inl"
#include "colors_define.inl"
-#define ENTRY_BUBBLE_TEXT_SIZE 20
-#define DATELINE_TEXT_SIZE 24
+#define ENTRY_BUBBLE_TEXT_SIZE 20
+#define DATELINE_TEXT_SIZE 24
+#define REPLY_TEXT_SIZE 24
-#define BUBBLE_CONTENT_WIDTH_MAX 240
-#define BUBBLE_CONTENT_WIDTH_MIN 78
-#define BUBBLE_CONTENT_HEIGHT_MIN 37
+#define BUBBLE_CONTENT_WIDTH_MAX 240
+#define BUBBLE_CONTENT_WIDTH_MIN 78
+#define BUBBLE_CONTENT_HEIGHT_MIN 37
-#define BUBBLE_CONTENT_PAD_TOP_HEIGHT 5
-#define BUBBLE_CONTENT_PAD_BOTTOM_HEIGHT 4
-#define BUBBLE_CONTENT_PAD_LEFT_WIDTH 17
-#define BUBBLE_CONTENT_PAD_RIGHT_WIDTH 26
+#define BUBBLE_CONTENT_PAD_TOP_HEIGHT 5
+#define BUBBLE_CONTENT_PAD_BOTTOM_HEIGHT 4
+#define BUBBLE_CONTENT_PAD_LEFT_WIDTH 17
+#define BUBBLE_CONTENT_PAD_RIGHT_WIDTH 26
-#define BUBBLE_PAD_BOTTOM_HEIGHT 15
-#define BUBBLE_PAD_LEFT_WIDTH 60
-#define BUBBLE_PAD_RIGHT_WIDTH 34
-#define BUBBLE_PAD_CHECK_WIDTH 32
+#define BUBBLE_PAD_BOTTOM_HEIGHT 15
+#define BUBBLE_PAD_LEFT_WIDTH 60
+#define BUBBLE_PAD_RIGHT_WIDTH 34
+#define BUBBLE_PAD_CHECK_WIDTH 32
-#define DATELINE_TOP_PADDING 11
-#define DATELINE_BOTTOM_PADDING 26
+#define DATELINE_TOP_PADDING 11
+#define DATELINE_BOTTOM_PADDING 26
-#define DATELINE_SIDE_PADDING 32
-#define DATELINE_CENTER_PADDING 12
+#define DATELINE_SIDE_PADDING 32
+#define DATELINE_CENTER_PADDING 12
-#define DATELINE_HEIGHT 32
+#define DATELINE_HEIGHT 32
-#define DIVIDER_TOP_PADDING 15
-#define DIVIDER_BOTTOM_PADDING 15
-#define DIVIDER_HEIGHT 2
+#define DIVIDER_TOP_PADDING 15
+#define DIVIDER_BOTTOM_PADDING 15
+#define DIVIDER_HEIGHT 2
+
+#define REPLY_SWALLOW_SIZE 89
collections {
base: "font=Tizen:weight=Normal:width=Condensed font_size="DATELINE_TEXT_SIZE" text_class=tizen color=#ffae0d align=center";
tag: "match" "+ color=#006EFF";
}
+ style {
+ name: "reply_textblock_style";
+ base: "font=Tizen:weight=Normal:width=Condensed font_size="REPLY_TEXT_SIZE" text_class=tizen color=#fafafa align=center";
+ tag: "match" "+ color=#006EFF";
+ }
}
group { name: "elm/genlist/item/sentbubble/default";
}
}
}
+
+ group {
+ name: "elm/genlist/item/reply/default";
+ data.item: "banded_bg_area" "elm.swallow.bg";
+ data.item: "texts" "reply.text";
+ data.item: "contents" "swallow.reply";
+ parts {
+ spacer { "base"; scale; mouse;
+ desc { "default";
+ }
+ }
+ swallow { "elm.swallow.bg"; scale;
+ desc { "default";
+ }
+ }
+ spacer { "padding.top"; scale;
+ desc { "default";
+ align: 0 0;
+ min: 0 11;
+ max: -1 11;
+ fixed: 0 1;
+ }
+ }
+ spacer { "padding.bottom"; scale;
+ desc { "default";
+ align: 0 1;
+ min: 0 0;
+ max: -1 0;
+ fixed: 0 1;
+ }
+ }
+ swallow { "swallow.reply"; scale;
+ desc { "default";
+ min: REPLY_SWALLOW_SIZE REPLY_SWALLOW_SIZE;
+ max: REPLY_SWALLOW_SIZE REPLY_SWALLOW_SIZE;
+ rel1.to_y: "padding.top";
+ rel1.relative: 0 1;
+ rel2.to_y: "padding.top";
+ rel2.relative: 1 1;
+ align: 0.5 0;
+ fixed: 1 1;
+ }
+ }
+ spacer { "reply.padding.bottom"; scale;
+ desc { "default";
+ min: 0 5;
+ max: -1 5;
+ rel1.to_y: "swallow.reply";
+ rel1.relative: 0 1;
+ rel2.relative: 1 1;
+ align: 0.5 0;
+ fixed: 0 1;
+ }
+ }
+ textblock { "reply.text"; scale;
+ mouse_events: 0;
+ desc { "default";
+ rel1.to_y: "reply.padding.bottom";
+ rel1.relative: 0 1;
+ rel2.to_y: "padding.bottom";
+ rel2.relative: 1 0;
+ align: 0.5 0;
+ min: 0 36;
+ max: -1 36;
+ fixed: 0 1;
+ text.style: "reply_textblock_style";
+ text.max: 1 0;
+ }
+ }
+ }
+ }
}
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ConReplyListItem_h_
+#define ConReplyListItem_h_
+
+#include "ListItem.h"
+
+namespace Msg {
+ class ConvReplyListItem
+ : public ListItem {
+ public:
+ ConvReplyListItem();
+ virtual ~ConvReplyListItem();
+
+ private:
+ std::string getText(ListItem &item, const char *part) override;
+ Evas_Object *getContent(ListItem &item, const char *part) override;
+
+ Evas_Object *getReplyButton();
+ };
+}
+
+#endif /* ConReplyListItem_h_ */
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ConvReplyListItem.h"
+#include "ListView.h"
+
+using namespace Msg;
+
+namespace {
+ const char *replyText = "reply.text";
+ const char *replyContent = "swallow.reply";
+}
+
+ConvReplyListItem::ConvReplyListItem()
+ : ListItem(ListItemStyle::create("reply"))
+{
+}
+
+ConvReplyListItem::~ConvReplyListItem()
+{
+}
+
+std::string ConvReplyListItem::getText(ListItem &item, const char *part)
+{
+ if (!strcmp(part, replyText))
+ return msg("WDS_MSG_OPT_REPLY_ABB").cStr();
+
+ return "";
+}
+
+Evas_Object *ConvReplyListItem::getContent(ListItem &item, const char *part)
+{
+ if (!strcmp(part, replyContent))
+ return getReplyButton();
+
+ return nullptr;
+}
+
+Evas_Object *ConvReplyListItem::getReplyButton()
+{
+ Evas_Object *btn = View::addIconButton(*getOwner(), "conv/reply_icon");
+ return btn;
+}