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);
}
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());
}