summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2016-11-24 15:15:53 +0900
committerkyungwook tak <k.tak@samsung.com>2016-11-23 23:33:17 -0800
commit4faf2c73caeb23876b088c130387ffe935b697a1 (patch)
tree787470efb8d213d5fb3eba6f63357322155f4da3
parent8a1ff0efa7824b898c4b3a3d11b21e77ed761f15 (diff)
downloadcsr-framework-4faf2c73caeb23876b088c130387ffe935b697a1.tar.gz
csr-framework-4faf2c73caeb23876b088c130387ffe935b697a1.tar.bz2
csr-framework-4faf2c73caeb23876b088c130387ffe935b697a1.zip
Fix button text ellipsis bug on popup
Button's text was ellipsis like "Unins..." Change-Id: I570f2552b0d588dcb5acbc282df548c1d56d42ad Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--src/framework/ui/popup/popup.cpp18
-rw-r--r--src/framework/ui/popup/popup.h2
2 files changed, 15 insertions, 5 deletions
diff --git a/src/framework/ui/popup/popup.cpp b/src/framework/ui/popup/popup.cpp
index 85aaa56..46a0cd3 100644
--- a/src/framework/ui/popup/popup.cpp
+++ b/src/framework/ui/popup/popup.cpp
@@ -105,19 +105,27 @@ Popup::Popup(int buttonN)
elm_box_pack_end(m_box, m_footer);
evas_object_show(m_footer);
- elm_object_content_set(m_popup, m_box);
-
// Add buttons dynamically.
+ m_btnBox = elm_box_add(m_popup);
+ setDefaultProperties(m_btnBox);
+ elm_box_horizontal_set(m_btnBox, EINA_TRUE);
+ elm_box_padding_set(m_btnBox, 0, 0);
+
for(int i=1 ; i <= buttonN; i++) {
std::string id("button" + std::to_string(i));
Evas_Object *button = elm_button_add(m_popup);
elm_object_style_set(button, "bottom");
- elm_object_part_content_set(m_popup, id.c_str(), button);
+ setDefaultProperties(button);
+ elm_box_pack_end(m_btnBox, button);
evas_object_show(button);
-
m_buttons.emplace_back(button);
}
+ elm_box_pack_end(m_box, m_btnBox);
+ evas_object_show(m_btnBox);
+
+ elm_object_content_set(m_popup, m_box);
+
evas_object_show(m_popup);
evas_object_show(m_win);
}
@@ -196,7 +204,7 @@ void Popup::setRotationToWin(Evas_Object *win) noexcept
void Popup::setText(Evas_Object *obj, const std::string &text) noexcept
{
- // Eable text line-break automatically.
+ // Enable text line-break automatically.
elm_label_line_wrap_set(obj, ELM_WRAP_WORD);
elm_object_text_set(obj, text.c_str());
}
diff --git a/src/framework/ui/popup/popup.h b/src/framework/ui/popup/popup.h
index 8e6518c..4475d96 100644
--- a/src/framework/ui/popup/popup.h
+++ b/src/framework/ui/popup/popup.h
@@ -48,6 +48,7 @@ namespace Ui {
* | |
* | content(footer) |
* ====================
+ * |------btnBox------|
* | button(N) |
* --------------------
*/
@@ -92,6 +93,7 @@ private:
Evas_Object *m_popup;
Evas_Object *m_box;
Evas_Object *m_subBox;
+ Evas_Object *m_btnBox;
Evas_Object *m_header;
Evas_Object *m_body;
Evas_Object *m_footer;