forked from enlightenment/efl
elementary: Fix style issues in multibuttonentry
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 65563
This commit is contained in:
parent
45e5c083c3
commit
8b310f0c48
|
@ -631,7 +631,7 @@ _change_current_button(Evas_Object *obj, Evas_Object *btn)
|
|||
break;
|
||||
}
|
||||
}
|
||||
// chagne the state of current button to "focused"
|
||||
// change the state of current button to "focused"
|
||||
_change_current_button_state(obj, MULTIBUTTONENTRY_BUTTON_STATE_SELECTED);
|
||||
|
||||
}
|
||||
|
@ -937,13 +937,8 @@ _evas_mbe_key_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
|
|||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Elm_Multibuttonentry_Item *item = NULL;
|
||||
|
||||
static char str[MAX_STR];
|
||||
|
||||
if (!wd || !wd->base || !wd->box) return;
|
||||
|
||||
strncpy(str, elm_entry_entry_get(wd->entry), MAX_STR);
|
||||
str[MAX_STR - 1] = 0;
|
||||
|
||||
Evas_Event_Key_Up *ev = (Evas_Event_Key_Up*)event_info;
|
||||
|
||||
if (wd->last_btn_select)
|
||||
|
@ -1081,7 +1076,8 @@ _view_init(Evas_Object *obj)
|
|||
|
||||
if (!wd->box)
|
||||
{
|
||||
if (! (wd->box = elm_box_add (obj))) return;
|
||||
wd->box = elm_box_add (obj);
|
||||
if (!wd->box) return;
|
||||
elm_widget_sub_object_add(obj, wd->box);
|
||||
elm_box_layout_set(wd->box, _box_layout_cb, NULL, NULL);
|
||||
elm_box_homogeneous_set(wd->box, EINA_FALSE);
|
||||
|
@ -1089,7 +1085,8 @@ _view_init(Evas_Object *obj)
|
|||
}
|
||||
if (!wd->label)
|
||||
{
|
||||
if (!(wd->label = edje_object_add(evas_object_evas_get(obj)))) return;
|
||||
wd->label = edje_object_add(evas_object_evas_get(obj));
|
||||
if (!wd->label) return;
|
||||
_elm_theme_object_set(obj, wd->label, "multibuttonentry", "label", elm_widget_style_get(obj));
|
||||
_set_label(obj, "");
|
||||
elm_widget_sub_object_add(obj, wd->label);
|
||||
|
@ -1097,7 +1094,8 @@ _view_init(Evas_Object *obj)
|
|||
|
||||
if (!wd->entry)
|
||||
{
|
||||
if (! (wd->entry = elm_entry_add (obj))) return;
|
||||
wd->entry = elm_entry_add (obj);
|
||||
if (!wd->entry) return;
|
||||
elm_entry_single_line_set(wd->entry, EINA_TRUE);
|
||||
elm_entry_entry_set(wd->entry, "");
|
||||
elm_entry_cursor_end_set(wd->entry);
|
||||
|
@ -1114,14 +1112,16 @@ _view_init(Evas_Object *obj)
|
|||
const char *end_type = edje_object_data_get(wd->base, "closed_button_type");
|
||||
if (!end_type || !strcmp(end_type, "label"))
|
||||
{
|
||||
if (! (wd->end = elm_label_add (obj))) return;
|
||||
wd->end = elm_label_add (obj);
|
||||
if (!wd->end) return;
|
||||
elm_object_style_set(wd->end, "extended/multibuttonentry_default");
|
||||
wd->end_type = MULTIBUTTONENTRY_CLOSED_LABEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *size_str;
|
||||
if (!(wd->end = edje_object_add(evas_object_evas_get(obj)))) return;
|
||||
wd->end = edje_object_add(evas_object_evas_get(obj));
|
||||
if (!wd->end) return;
|
||||
_elm_theme_object_set(obj, wd->end, "multibuttonentry", "closedbutton", elm_widget_style_get(obj));
|
||||
Evas_Coord button_min_width = 0;
|
||||
Evas_Coord button_min_height = 0;
|
||||
|
|
Loading…
Reference in New Issue