summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-27 15:31:37 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-27 16:09:18 +0900
commitec7aef854668a11efe1fe7fe97fa9da64f5c7d69 (patch)
tree9021bb90c248e59453d19d93f5ff816ddca9976f
parentff2c58b89c54fa27ed2b61f836d37ebb715e0df6 (diff)
downloadefl-ec7aef854668a11efe1fe7fe97fa9da64f5c7d69.tar.gz
efl_ui_popup_alert: Remove expandable property for now
It needs more time to stabilize expandable property. So the expandable property is removed for now. The expandable property will be added later.
-rw-r--r--src/bin/elementary/test_ui_popup.c6
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.c97
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.eo17
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll_private.h8
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.c44
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.eo16
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text_private.h6
7 files changed, 6 insertions, 188 deletions
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index 770ff93f7c..3db83fb123 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -383,9 +383,6 @@ test_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE, "No");
efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_USER, "Cancel");
- efl_ui_popup_alert_scroll_expandable_set(efl_ui_popup, EINA_TRUE, EINA_TRUE);
- efl_gfx_size_hint_max_set(efl_ui_popup, EINA_SIZE2D(300, 180));
-
efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
}
@@ -413,9 +410,6 @@ test_ui_popup_alert_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE, "No");
efl_ui_popup_alert_button_set(efl_ui_popup, EFL_UI_POPUP_ALERT_BUTTON_USER, "Cancel");
- efl_ui_popup_alert_text_expandable_set(efl_ui_popup, EINA_TRUE);
- efl_gfx_size_hint_max_set(efl_ui_popup, EINA_SIZE2D(100, 180));
-
efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_ALERT_EVENT_CLICKED, efl_ui_popup_alert_clicked_cb, NULL);
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index ac57b3d6b4..ed790db052 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -12,63 +12,9 @@
#define MY_CLASS EFL_UI_POPUP_ALERT_SCROLL_CLASS
#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll"
-static void
-_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Eina_Size2D min)
-{
- Eina_Rect geom = efl_gfx_geometry_get(obj);
-
- pd->is_sizing_eval = EINA_TRUE;
-
- if (pd->is_expandable_w && !pd->is_expandable_h)
- {
- if ((pd->max_scroll.w > -1) && (min.w > pd->max_scroll.w))
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- efl_gfx_size_set(obj, EINA_SIZE2D(pd->max_scroll.w, geom.h));
- }
- }
- else if (!pd->is_expandable_w && pd->is_expandable_h)
- {
- if ((pd->max_scroll.h > -1) && (min.h > pd->max_scroll.h))
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll.h));
- }
- }
- else if (pd->is_expandable_w && pd->is_expandable_h)
- {
- Eina_Bool wdir, hdir;
- wdir = hdir = EINA_FALSE;
-
- if ((pd->max_scroll.w > -1) && (min.w > pd->max_scroll.w))
- wdir = 1;
- if ((pd->max_scroll.h > -1) && (min.h > pd->max_scroll.h))
- hdir = 1;
- if (wdir && !hdir)
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
- efl_gfx_size_set(obj, EINA_SIZE2D(pd->max_scroll.w, geom.h));
- }
- else if (!wdir && hdir)
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
- efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll.h));
- }
- else if(wdir && hdir)
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- efl_gfx_size_set(obj, pd->max_scroll);
- }
- }
-
- pd->is_sizing_eval = EINA_FALSE;
-}
-
EOLIAN static void
-_efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd)
+_efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd EINA_UNUSED)
{
- if (pd->is_sizing_eval) return;
-
elm_layout_sizing_eval(efl_super(obj, MY_CLASS));
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -78,8 +24,6 @@ _efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Sc
edje_object_size_min_restricted_calc
(wd->resize_obj, &minw, &minh, minw, minh);
efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
-
- _scroller_sizing_eval(obj, pd, EINA_SIZE2D(minw, minh));
}
static Eina_Bool
@@ -145,43 +89,6 @@ _efl_ui_popup_alert_scroll_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Alert_Scro
return efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
}
-static void
-_efl_ui_popup_alert_scroll_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Alert_Scroll_Data *pd, Eina_Bool is_expandable_w, Eina_Bool is_expandable_h)
-{
- if (is_expandable_w && !is_expandable_h)
- {
- pd->is_expandable_w = EINA_TRUE;
- pd->is_expandable_h = EINA_FALSE;
- elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
- }
- else if(!is_expandable_w && is_expandable_h)
- {
- pd->is_expandable_w = EINA_FALSE;
- pd->is_expandable_h = EINA_TRUE;
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
- }
- else if(is_expandable_w && is_expandable_h)
- {
- pd->is_expandable_w = EINA_TRUE;
- pd->is_expandable_h = EINA_TRUE;
- elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_TRUE);
- }
- else
- {
- pd->is_expandable_w = EINA_FALSE;
- pd->is_expandable_h = EINA_FALSE;
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- }
-}
-
-static void
-_efl_ui_popup_alert_scroll_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Eina_Size2D size)
-{
- efl_gfx_size_hint_max_set(efl_super(obj, MY_CLASS), size);
- pd->max_scroll = size;
- elm_layout_sizing_eval(obj);
-}
-
EOLIAN static Eo *
_efl_ui_popup_alert_scroll_efl_object_constructor(Eo *obj,
Efl_Ui_Popup_Alert_Scroll_Data *pd)
@@ -201,8 +108,6 @@ _efl_ui_popup_alert_scroll_efl_object_constructor(Eo *obj,
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"),
pd->scroller);
- pd->max_scroll = EINA_SIZE2D(-1, -1);
-
return obj;
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.eo b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
index b680f7644c..641a5d6899 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
@@ -1,24 +1,7 @@
class Efl.Ui.Popup.Alert.Scroll(Efl.Ui.Popup.Alert)
{
- methods {
- @property expandable {
- set {
- [[Set the expandable of popup.
-
- If the contents of the popup has min size, popup will be increased by min size.
- If max hint is set, it will be increased to value of max hint,
- and then scrolling will occur.
- ]]
- }
- values {
- is_expandable_w: bool;
- is_expandable_h: bool;
- }
- }
- }
implements {
Efl.Object.constructor;
- Efl.Gfx.Size.Hint.hint_max { set; }
Efl.Part.part;
}
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll_private.h b/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
index 99a000146a..c1219b9398 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
@@ -6,12 +6,8 @@
typedef struct _Efl_Ui_Popup_Alert_Scroll_Data Efl_Ui_Popup_Alert_Scroll_Data;
struct _Efl_Ui_Popup_Alert_Scroll_Data
{
- Eo *scroller;
- Eo *content;
- Eina_Size2D max_scroll;
- Eina_Bool is_expandable_w : 1;
- Eina_Bool is_expandable_h : 1;
- Eina_Bool is_sizing_eval : 1;
+ Eo *scroller;
+ Eo *content;
};
#endif
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.c b/src/lib/elementary/efl_ui_popup_alert_text.c
index 9bf90f121d..08793ac941 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.c
+++ b/src/lib/elementary/efl_ui_popup_alert_text.c
@@ -12,23 +12,8 @@
#define MY_CLASS EFL_UI_POPUP_ALERT_TEXT_CLASS
#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Text"
-static void
-_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, Evas_Coord minh)
-{
- Eina_Rect geom = efl_gfx_geometry_get(obj);
-
- if (pd->is_expandable_h)
- {
- if ((pd->max_scroll_h > -1) && (minh > pd->max_scroll_h))
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll_h));
- }
- }
-}
-
EOLIAN static void
-_efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd)
+_efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED)
{
elm_layout_sizing_eval(efl_super(obj, MY_CLASS));
@@ -38,8 +23,6 @@ _efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc(wd->resize_obj, &minw, &minh, minw, minh);
efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
-
- _scroller_sizing_eval(obj, pd, minh);
}
static Eina_Bool
@@ -108,29 +91,6 @@ _efl_ui_popup_alert_text_efl_text_text_get(Eo *obj, Efl_Ui_Popup_Alert_Text_Data
return _efl_ui_popup_alert_text_text_get(obj, pd, "elm.text");
}
-static void
-_efl_ui_popup_alert_text_expandable_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Alert_Text_Data *pd, Eina_Bool is_expandable_h)
-{
- if (is_expandable_h)
- {
- pd->is_expandable_h = EINA_TRUE;
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
- }
- else
- {
- pd->is_expandable_h = EINA_FALSE;
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- }
-}
-
-static void
-_efl_ui_popup_alert_text_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, Eina_Size2D size)
-{
- efl_gfx_size_hint_max_set(efl_super(obj, MY_CLASS), size);
- pd->max_scroll_h = size.h;
- elm_layout_sizing_eval(obj);
-}
-
EOLIAN static Eo *
_efl_ui_popup_alert_text_efl_object_constructor(Eo *obj,
Efl_Ui_Popup_Alert_Text_Data *pd)
@@ -150,8 +110,6 @@ _efl_ui_popup_alert_text_efl_object_constructor(Eo *obj,
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"),
pd->scroller);
- pd->max_scroll_h = -1;
-
return obj;
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.eo b/src/lib/elementary/efl_ui_popup_alert_text.eo
index d26ac90749..b00f084696 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_text.eo
@@ -1,23 +1,7 @@
class Efl.Ui.Popup.Alert.Text(Efl.Ui.Popup.Alert, Efl.Text)
{
- methods {
- @property expandable {
- set {
- [[Set the expandable of popup.
-
- If the contents of the popup has min size, popup will be increased by min size to the y direction.
- If max hint is set, it will be increased to value of max hint,
- and then scrolling will occur.
- ]]
- }
- values {
- is_expandable: bool;
- }
- }
- }
implements {
Efl.Object.constructor;
- Efl.Gfx.Size.Hint.hint_max { set;}
Efl.Text.text { get; set; }
Efl.Part.part;
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_text_private.h b/src/lib/elementary/efl_ui_popup_alert_text_private.h
index b911199b5d..8205630f7c 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text_private.h
+++ b/src/lib/elementary/efl_ui_popup_alert_text_private.h
@@ -6,10 +6,8 @@
typedef struct _Efl_Ui_Popup_Alert_Text_Data Efl_Ui_Popup_Alert_Text_Data;
struct _Efl_Ui_Popup_Alert_Text_Data
{
- Eo *scroller;
- Eo *message;
- Evas_Coord max_scroll_h;
- Eina_Bool is_expandable_h : 1;
+ Eo *scroller;
+ Eo *message;
};
#endif