elm_win_alpha_set(m_win, EINA_TRUE);
#ifdef MOBILE_UI
+
// popup
m_popup = elm_popup_add(m_win);
if (!m_popup) {
ALOGE("EFL : Failed to add popup");
throw Exception("Elementary failed");
}
+ elm_popup_align_set(m_popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
elm_object_part_text_set(m_popup, "title,text", popupTitle);
+ evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- // box
- m_box = elm_box_add(m_popup);
- if (!m_box) {
- ALOGE("EFL : Failed to add box");
- throw Exception("Enlightement failed");
- }
- evas_object_size_hint_weight_set(m_box, EVAS_HINT_EXPAND, 0);
- evas_object_size_hint_align_set(m_box, EVAS_HINT_FILL, 0.0);
+ // layout
+ m_layout = elm_layout_add(m_popup);
+ elm_layout_file_set(m_layout, RES_DIR"/popup_custom.edj", "popup_checkview_layout_mobile");
+ evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// content
- m_content = elm_label_add(m_popup);
+ m_content = elm_label_add(m_layout);
if (!m_content) {
ALOGE("EFL : Failed to add content");
throw Exception("Enlightement failed");
}
- elm_object_style_set(m_content, "elm.swallow.content");
+ elm_object_style_set(m_content, "popup/default");
elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
- evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_show(m_content);
- elm_box_pack_end(m_box, m_content);
+ elm_object_part_content_set(m_layout, "elm.swallow.content", m_content);
// checkbox
- m_checkbox = elm_check_add(m_popup);
+ m_checkbox = elm_check_add(m_layout);
if (!m_checkbox) {
ALOGE("EFL : Failed to add checkbox");
throw Exception("Enlightement failed");
}
- elm_object_part_content_set(m_popup, "checkbox1", m_checkbox);
+ elm_object_part_content_set(m_layout, "elm.swallow.end", m_checkbox);
elm_object_text_set(m_checkbox, checkBoxText);
elm_check_state_set(m_checkbox, EINA_FALSE);
- evas_object_size_hint_align_set(m_checkbox, EVAS_HINT_FILL, 0.0);
evas_object_show(m_checkbox);
- elm_box_pack_end(m_box, m_checkbox);
-
- elm_object_part_content_set(m_popup, "default", m_box);
// buttons
m_denyButton = elm_button_add(m_popup);
elm_object_part_content_set(m_popup, "button2", m_allowButton);
elm_object_text_set(m_allowButton, dgettext(PROJECT_NAME,
"IDS_IDLE_BUTTON_ALLOW_ABB7"));
+ elm_object_content_set(m_popup, m_layout);
+ evas_object_show(m_popup);
+
#elif defined(CIRCLE_UI)
Evas_Object *icon;
* limitations under the License.
*
*/
+
collections {
base_scale: 1.3;
//Height = 480 - (2 + 83 + 68)
}
}
}
+group { "popup_checkview_layout_mobile";
+ parts {
+ spacer { "spacer_t";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.relative: 0.00 0.00;
+ rel2.relative: 1.00 0.04;
+ }
+ }
+ spacer { "spacer_b";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.relative: 0.00 0.94;
+ rel2.relative: 1.00 1.00;
+ }
+ }
+ spacer { "spacer_l";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.to_y: "spacer_t";
+ rel2.to_y: "spacer_b";
+ rel1.relative: 0.91 1.00;
+ rel2.relative: 1.00 0.00;
+ }
+ }
+ spacer { "spacer_r";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.to_y: "spacer_t";
+ rel2.to_y: "spacer_b";
+ rel1.relative: 0.00 1.00;
+ rel2.relative: 0.09 0.00;
+ }
+ }
+ swallow { "elm.swallow.content";
+ scale: 1;
+ desc { "default";
+ visible: 1;
+ align: 0.5 0.5;
+ rel1.to_x: "spacer_rr";
+ rel1.to_y: "spacer_t";
+ rel2.to_x: "spacer_ll";
+ rel1.relative: 1.00 1.00;
+ rel2.relative: 0.00 0.64;
+ }
+ }
+ swallow { "elm.swallow.end";
+ scale: 1;
+ desc { "default";
+ visible: 1;
+ align: 0.5 0.5;
+ rel1.to_x: "spacer_r";
+ rel1.to_y: "elm.swallow.content";
+ rel2.to_x: "spacer_l";
+ rel2.to_y: "spacer_b";
+ rel1.relative: 1.00 1.00;
+ rel2.relative: 0.00 0.00;
+ }
+ }
+ spacer { "spacer_rr";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.to_y: "spacer_t";
+ rel2.to_y: "spacer_b";
+ rel1.relative: 0.00 1.00;
+ rel2.relative: 0.05 0.00;
+ }
+ }
+ spacer { "spacer_ll";
+ scale: 1;
+ desc { "default";
+ align: 0.5 0.5;
+ rel1.to_y: "spacer_t";
+ rel2.to_y: "spacer_b";
+ rel1.relative: 0.95 1.00;
+ rel2.relative: 1.00 0.00;
+ }
+ }
+ }
+}
}