forked from enlightenment/efl
Efl.Ui.Panes: rename allow_user_size_hints to hint_min_allow
thanks to raster for suggestion.
This commit is contained in:
parent
92c26078c7
commit
479b189c9a
|
@ -136,7 +136,7 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
efl_gfx_size_hint_min_set(efl_added, 10, 0),
|
efl_gfx_size_hint_min_set(efl_added, 10, 0),
|
||||||
efl_content_set(efl_part(panes_h, "first"), efl_added)
|
efl_content_set(efl_part(panes_h, "first"), efl_added)
|
||||||
);
|
);
|
||||||
efl_ui_panes_internal_part_allow_user_size_hints_set(efl_part(panes_h, "first"), EINA_TRUE);
|
efl_ui_panes_internal_part_hint_min_allow_set(efl_part(panes_h, "first"), EINA_TRUE);
|
||||||
|
|
||||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||||
efl_text_set(efl_added, "Down - min size 50 40"),
|
efl_text_set(efl_added, "Down - min size 50 40"),
|
||||||
|
|
|
@ -192,7 +192,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
|
||||||
|
|
||||||
if (first_content)
|
if (first_content)
|
||||||
{
|
{
|
||||||
if (!sd->first_allow_user_hints)
|
if (!sd->first_hint_min_allow)
|
||||||
efl_gfx_size_hint_combined_min_get(first_content, &sd->first_minw, &sd->first_minh);
|
efl_gfx_size_hint_combined_min_get(first_content, &sd->first_minw, &sd->first_minh);
|
||||||
else
|
else
|
||||||
efl_gfx_size_hint_min_get(first_content, &sd->first_minw, &sd->first_minh);
|
efl_gfx_size_hint_min_get(first_content, &sd->first_minw, &sd->first_minh);
|
||||||
|
@ -200,7 +200,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
|
||||||
|
|
||||||
if (second_content)
|
if (second_content)
|
||||||
{
|
{
|
||||||
if (!sd->second_allow_user_hints)
|
if (!sd->second_hint_min_allow)
|
||||||
efl_gfx_size_hint_combined_min_get(second_content, &sd->second_minw, &sd->second_minh);
|
efl_gfx_size_hint_combined_min_get(second_content, &sd->second_minw, &sd->second_minh);
|
||||||
else
|
else
|
||||||
efl_gfx_size_hint_min_get(second_content, &sd->second_minw, &sd->second_minh);
|
efl_gfx_size_hint_min_get(second_content, &sd->second_minw, &sd->second_minh);
|
||||||
|
@ -603,27 +603,27 @@ _efl_ui_panes_class_constructor(Efl_Class *klass)
|
||||||
ELM_PART_OVERRIDE(efl_ui_panes, EFL_UI_PANES, EFL_UI_LAYOUT, Efl_Ui_Panes_Data, Elm_Part_Data)
|
ELM_PART_OVERRIDE(efl_ui_panes, EFL_UI_PANES, EFL_UI_LAYOUT, Efl_Ui_Panes_Data, Elm_Part_Data)
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_ui_panes_internal_part_allow_user_size_hints_set(Eo *obj, Elm_Part_Data *_pd EINA_UNUSED, Eina_Bool allow)
|
_efl_ui_panes_internal_part_hint_min_allow_set(Eo *obj, Elm_Part_Data *_pd EINA_UNUSED, Eina_Bool allow)
|
||||||
{
|
{
|
||||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_LAYOUT_INTERNAL_PART_CLASS);
|
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_LAYOUT_INTERNAL_PART_CLASS);
|
||||||
Efl_Ui_Panes_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PANES_CLASS);
|
Efl_Ui_Panes_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PANES_CLASS);
|
||||||
|
|
||||||
if (!strcmp(pd->part, "first"))
|
if (!strcmp(pd->part, "first"))
|
||||||
{
|
{
|
||||||
if (sd->first_allow_user_hints == allow) return;
|
if (sd->first_hint_min_allow == allow) return;
|
||||||
sd->first_allow_user_hints = allow;
|
sd->first_hint_min_allow = allow;
|
||||||
elm_layout_sizing_eval(pd->obj);
|
elm_layout_sizing_eval(pd->obj);
|
||||||
}
|
}
|
||||||
else if (!strcmp(pd->part, "second"))
|
else if (!strcmp(pd->part, "second"))
|
||||||
{
|
{
|
||||||
if (sd->second_allow_user_hints == allow) return;
|
if (sd->second_hint_min_allow == allow) return;
|
||||||
sd->second_allow_user_hints = allow;
|
sd->second_hint_min_allow = allow;
|
||||||
elm_layout_sizing_eval(pd->obj);
|
elm_layout_sizing_eval(pd->obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_efl_ui_panes_internal_part_allow_user_size_hints_get(Eo *obj, Elm_Part_Data *_pd EINA_UNUSED)
|
_efl_ui_panes_internal_part_hint_min_allow_get(Eo *obj, Elm_Part_Data *_pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
Eina_Bool ret = EINA_FALSE;
|
||||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_LAYOUT_INTERNAL_PART_CLASS);
|
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_LAYOUT_INTERNAL_PART_CLASS);
|
||||||
|
@ -631,11 +631,11 @@ _efl_ui_panes_internal_part_allow_user_size_hints_get(Eo *obj, Elm_Part_Data *_p
|
||||||
|
|
||||||
if (!strcmp(pd->part, "first"))
|
if (!strcmp(pd->part, "first"))
|
||||||
{
|
{
|
||||||
ret = sd->first_allow_user_hints;
|
ret = sd->first_hint_min_allow;
|
||||||
}
|
}
|
||||||
else if (!strcmp(pd->part, "second"))
|
else if (!strcmp(pd->part, "second"))
|
||||||
{
|
{
|
||||||
ret = sd->second_allow_user_hints;
|
ret = sd->second_hint_min_allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -3,7 +3,7 @@ class Efl.Ui.Panes.Internal.Part (Efl.Ui.Layout.Internal.Part)
|
||||||
[[Elementary Panes internal part class]]
|
[[Elementary Panes internal part class]]
|
||||||
data: Elm_Part_Data;
|
data: Elm_Part_Data;
|
||||||
methods {
|
methods {
|
||||||
@property allow_user_size_hints {
|
@property hint_min_allow {
|
||||||
[[allow user to set size hints to be respected and ignore combined min size.
|
[[allow user to set size hints to be respected and ignore combined min size.
|
||||||
If this flag is set, the minimum size set by @Efl.Gfx.Size.Hint.hint_min.set is respected forcefully.
|
If this flag is set, the minimum size set by @Efl.Gfx.Size.Hint.hint_min.set is respected forcefully.
|
||||||
]]
|
]]
|
||||||
|
|
|
@ -47,8 +47,8 @@ struct _Efl_Ui_Panes_Data
|
||||||
Eina_Bool fixed : 1;
|
Eina_Bool fixed : 1;
|
||||||
Eina_Bool left_min_size_is_relative : 1;
|
Eina_Bool left_min_size_is_relative : 1;
|
||||||
Eina_Bool right_min_size_is_relative : 1;
|
Eina_Bool right_min_size_is_relative : 1;
|
||||||
Eina_Bool first_allow_user_hints : 1;
|
Eina_Bool first_hint_min_allow : 1;
|
||||||
Eina_Bool second_allow_user_hints : 1;
|
Eina_Bool second_hint_min_allow : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue