forked from enlightenment/efl
Elementary: fixed on-the-fly UI-mirroring in elc objects.
All sub-objects have auto-ui-mirroring flag turned off now By Aharon Hillel. SVN revision: 56922
This commit is contained in:
parent
62afe7cc3c
commit
f55a3f4cfc
|
@ -135,6 +135,7 @@ _theme_hook(Evas_Object *obj)
|
||||||
|
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
_elm_widget_mirrored_reload(obj);
|
_elm_widget_mirrored_reload(obj);
|
||||||
|
|
||||||
_elm_theme_object_set(obj, wd->edje, "fileselector", "base", style);
|
_elm_theme_object_set(obj, wd->edje, "fileselector", "base", style);
|
||||||
|
|
||||||
if (elm_object_disabled_get(obj))
|
if (elm_object_disabled_get(obj))
|
||||||
|
@ -592,6 +593,7 @@ elm_fileselector_add(Evas_Object *parent)
|
||||||
elm_icon_standard_set(ic, "arrow_up");
|
elm_icon_standard_set(ic, "arrow_up");
|
||||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||||
bt = elm_button_add(parent);
|
bt = elm_button_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||||
elm_button_icon_set(bt, ic);
|
elm_button_icon_set(bt, ic);
|
||||||
elm_button_label_set(bt, "Up");
|
elm_button_label_set(bt, "Up");
|
||||||
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
||||||
|
@ -606,6 +608,7 @@ elm_fileselector_add(Evas_Object *parent)
|
||||||
elm_icon_standard_set(ic, "home");
|
elm_icon_standard_set(ic, "home");
|
||||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||||
bt = elm_button_add(parent);
|
bt = elm_button_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||||
elm_button_icon_set(bt, ic);
|
elm_button_icon_set(bt, ic);
|
||||||
elm_button_label_set(bt, "Home");
|
elm_button_label_set(bt, "Home");
|
||||||
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
evas_object_size_hint_align_set(bt, 0.0, 0.0);
|
||||||
|
@ -622,11 +625,13 @@ elm_fileselector_add(Evas_Object *parent)
|
||||||
list_itc.func.del = grid_itc.func.del = _itc_del;
|
list_itc.func.del = grid_itc.func.del = _itc_del;
|
||||||
|
|
||||||
li = elm_genlist_add(parent);
|
li = elm_genlist_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(li, EINA_FALSE);
|
||||||
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_min_set(li, 100, 100);
|
evas_object_size_hint_min_set(li, 100, 100);
|
||||||
|
|
||||||
grid = elm_gengrid_add(parent);
|
grid = elm_gengrid_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(grid, EINA_FALSE);
|
||||||
evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
||||||
|
@ -649,6 +654,7 @@ elm_fileselector_add(Evas_Object *parent)
|
||||||
|
|
||||||
// path entry
|
// path entry
|
||||||
en = elm_scrolled_entry_add(parent);
|
en = elm_scrolled_entry_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(en, EINA_FALSE);
|
||||||
elm_scrolled_entry_editable_set(en, EINA_FALSE);
|
elm_scrolled_entry_editable_set(en, EINA_FALSE);
|
||||||
elm_scrolled_entry_single_line_set(en, EINA_TRUE);
|
elm_scrolled_entry_single_line_set(en, EINA_TRUE);
|
||||||
elm_scrolled_entry_line_char_wrap_set(en, EINA_TRUE);
|
elm_scrolled_entry_line_char_wrap_set(en, EINA_TRUE);
|
||||||
|
@ -662,6 +668,7 @@ elm_fileselector_add(Evas_Object *parent)
|
||||||
|
|
||||||
// filename entry
|
// filename entry
|
||||||
en = elm_scrolled_entry_add(parent);
|
en = elm_scrolled_entry_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(en, EINA_FALSE);
|
||||||
elm_scrolled_entry_editable_set(en, EINA_TRUE);
|
elm_scrolled_entry_editable_set(en, EINA_TRUE);
|
||||||
elm_scrolled_entry_single_line_set(en, EINA_TRUE);
|
elm_scrolled_entry_single_line_set(en, EINA_TRUE);
|
||||||
elm_scrolled_entry_line_char_wrap_set(en, EINA_TRUE);
|
elm_scrolled_entry_line_char_wrap_set(en, EINA_TRUE);
|
||||||
|
@ -783,6 +790,7 @@ elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj,
|
||||||
{
|
{
|
||||||
// cancel btn
|
// cancel btn
|
||||||
bt = elm_button_add(obj);
|
bt = elm_button_add(obj);
|
||||||
|
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||||
elm_button_label_set(bt, "Cancel");
|
elm_button_label_set(bt, "Cancel");
|
||||||
|
|
||||||
evas_object_smart_callback_add(bt, "clicked", _canc, obj);
|
evas_object_smart_callback_add(bt, "clicked", _canc, obj);
|
||||||
|
@ -792,6 +800,7 @@ elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj,
|
||||||
|
|
||||||
// ok btn
|
// ok btn
|
||||||
bt = elm_button_add(obj);
|
bt = elm_button_add(obj);
|
||||||
|
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||||
elm_button_label_set(bt, "OK");
|
elm_button_label_set(bt, "OK");
|
||||||
|
|
||||||
evas_object_smart_callback_add(bt, "clicked", _ok, obj);
|
evas_object_smart_callback_add(bt, "clicked", _ok, obj);
|
||||||
|
|
|
@ -98,6 +98,7 @@ _theme_hook(Evas_Object *obj)
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
_elm_widget_mirrored_reload(obj);
|
_elm_widget_mirrored_reload(obj);
|
||||||
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "fileselector_button/%s",
|
snprintf(buf, sizeof(buf), "fileselector_button/%s",
|
||||||
elm_widget_style_get(obj));
|
elm_widget_style_get(obj));
|
||||||
elm_object_style_set(wd->btn, buf);
|
elm_object_style_set(wd->btn, buf);
|
||||||
|
@ -203,6 +204,7 @@ _activate(Widget_Data *wd)
|
||||||
|
|
||||||
wd->fs = elm_fileselector_add(wd->fsw);
|
wd->fs = elm_fileselector_add(wd->fsw);
|
||||||
elm_widget_mirrored_set(wd->fs, elm_widget_mirrored_get(wd->self));
|
elm_widget_mirrored_set(wd->fs, elm_widget_mirrored_get(wd->self));
|
||||||
|
elm_widget_mirrored_automatic_set(wd->fs, EINA_FALSE);
|
||||||
elm_fileselector_expandable_set(wd->fs, wd->fsd.expandable);
|
elm_fileselector_expandable_set(wd->fs, wd->fsd.expandable);
|
||||||
elm_fileselector_folder_only_set(wd->fs, wd->fsd.folder_only);
|
elm_fileselector_folder_only_set(wd->fs, wd->fsd.folder_only);
|
||||||
elm_fileselector_is_save_set(wd->fs, wd->fsd.is_save);
|
elm_fileselector_is_save_set(wd->fs, wd->fsd.is_save);
|
||||||
|
@ -287,6 +289,7 @@ elm_fileselector_button_add(Evas_Object *parent)
|
||||||
elm_widget_activate_hook_set(obj, _activate_hook);
|
elm_widget_activate_hook_set(obj, _activate_hook);
|
||||||
|
|
||||||
wd->btn = elm_button_add(parent);
|
wd->btn = elm_button_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(wd->btn, EINA_FALSE);
|
||||||
elm_widget_resize_object_set(obj, wd->btn);
|
elm_widget_resize_object_set(obj, wd->btn);
|
||||||
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
|
|
|
@ -172,6 +172,7 @@ _theme_hook(Evas_Object *obj)
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
_elm_widget_mirrored_reload(obj);
|
_elm_widget_mirrored_reload(obj);
|
||||||
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
||||||
|
|
||||||
_elm_theme_object_set(obj, wd->edje, "fileselector_entry", "base", style);
|
_elm_theme_object_set(obj, wd->edje, "fileselector_entry", "base", style);
|
||||||
if (elm_object_disabled_get(obj))
|
if (elm_object_disabled_get(obj))
|
||||||
edje_object_signal_emit(wd->edje, "elm,state,disabled", "elm");
|
edje_object_signal_emit(wd->edje, "elm,state,disabled", "elm");
|
||||||
|
@ -247,6 +248,8 @@ elm_fileselector_entry_add(Evas_Object *parent)
|
||||||
elm_widget_resize_object_set(obj, wd->edje);
|
elm_widget_resize_object_set(obj, wd->edje);
|
||||||
|
|
||||||
wd->button = elm_fileselector_button_add(obj);
|
wd->button = elm_fileselector_button_add(obj);
|
||||||
|
elm_widget_mirrored_automatic_set(wd->button, EINA_FALSE);
|
||||||
|
ELM_SET_WIDTYPE(widtype, "fileselector_entry");
|
||||||
elm_widget_style_set(wd->button, "fileselector_entry/default");
|
elm_widget_style_set(wd->button, "fileselector_entry/default");
|
||||||
edje_object_part_swallow(wd->edje, "elm.swallow.button", wd->button);
|
edje_object_part_swallow(wd->edje, "elm.swallow.button", wd->button);
|
||||||
elm_widget_sub_object_add(obj, wd->button);
|
elm_widget_sub_object_add(obj, wd->button);
|
||||||
|
@ -263,6 +266,7 @@ elm_fileselector_entry_add(Evas_Object *parent)
|
||||||
#undef SIG_FWD
|
#undef SIG_FWD
|
||||||
|
|
||||||
wd->entry = elm_scrolled_entry_add(obj);
|
wd->entry = elm_scrolled_entry_add(obj);
|
||||||
|
elm_widget_mirrored_automatic_set(wd->entry, EINA_FALSE);
|
||||||
elm_widget_style_set(wd->entry, "fileselector_entry/default");
|
elm_widget_style_set(wd->entry, "fileselector_entry/default");
|
||||||
elm_scrolled_entry_single_line_set(wd->entry, EINA_TRUE);
|
elm_scrolled_entry_single_line_set(wd->entry, EINA_TRUE);
|
||||||
elm_scrolled_entry_editable_set(wd->entry, EINA_TRUE);
|
elm_scrolled_entry_editable_set(wd->entry, EINA_TRUE);
|
||||||
|
|
|
@ -92,6 +92,7 @@ _theme_hook(Evas_Object *obj)
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
_elm_widget_mirrored_reload(obj);
|
_elm_widget_mirrored_reload(obj);
|
||||||
|
|
||||||
elm_hoversel_hover_end(obj);
|
elm_hoversel_hover_end(obj);
|
||||||
if (wd->horizontal)
|
if (wd->horizontal)
|
||||||
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
||||||
|
@ -173,6 +174,7 @@ _activate(Evas_Object *obj)
|
||||||
|
|
||||||
if (elm_widget_disabled_get(obj)) return;
|
if (elm_widget_disabled_get(obj)) return;
|
||||||
wd->hover = elm_hover_add(obj);
|
wd->hover = elm_hover_add(obj);
|
||||||
|
elm_widget_mirrored_automatic_set(wd->hover, EINA_FALSE);
|
||||||
if (wd->horizontal)
|
if (wd->horizontal)
|
||||||
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
||||||
else
|
else
|
||||||
|
@ -183,6 +185,7 @@ _activate(Evas_Object *obj)
|
||||||
elm_hover_target_set(wd->hover, wd->btn);
|
elm_hover_target_set(wd->hover, wd->btn);
|
||||||
|
|
||||||
bx = elm_box_add(wd->hover);
|
bx = elm_box_add(wd->hover);
|
||||||
|
elm_widget_mirrored_automatic_set(bx, EINA_FALSE);
|
||||||
elm_box_homogenous_set(bx, 1);
|
elm_box_homogenous_set(bx, 1);
|
||||||
|
|
||||||
elm_box_horizontal_set(bx, wd->horizontal);
|
elm_box_horizontal_set(bx, wd->horizontal);
|
||||||
|
@ -196,6 +199,7 @@ _activate(Evas_Object *obj)
|
||||||
EINA_LIST_FOREACH(wd->items, l, item)
|
EINA_LIST_FOREACH(wd->items, l, item)
|
||||||
{
|
{
|
||||||
bt = elm_button_add(wd->hover);
|
bt = elm_button_add(wd->hover);
|
||||||
|
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||||
elm_widget_mirrored_set(bt, elm_widget_mirrored_get(obj));
|
elm_widget_mirrored_set(bt, elm_widget_mirrored_get(obj));
|
||||||
elm_object_style_set(bt, buf);
|
elm_object_style_set(bt, buf);
|
||||||
elm_button_label_set(bt, item->label);
|
elm_button_label_set(bt, item->label);
|
||||||
|
@ -289,6 +293,7 @@ elm_hoversel_add(Evas_Object *parent)
|
||||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||||
|
|
||||||
wd->btn = elm_button_add(parent);
|
wd->btn = elm_button_add(parent);
|
||||||
|
elm_widget_mirrored_automatic_set(wd->btn, EINA_FALSE);
|
||||||
wd->expanded = EINA_FALSE;
|
wd->expanded = EINA_FALSE;
|
||||||
elm_widget_resize_object_set(obj, wd->btn);
|
elm_widget_resize_object_set(obj, wd->btn);
|
||||||
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
|
|
Loading…
Reference in New Issue