From 812be4a43bed7f3284ffc26beb3204e505e4b01c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 28 Jul 2017 15:44:43 -0400 Subject: [PATCH] elm_win: do not implement aspect_get() this breaks aspect hints. @fix --- src/lib/elementary/efl_ui_win.c | 15 ++------------- src/lib/elementary/efl_ui_win.eo | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index dcc870e..b855857 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -183,7 +183,6 @@ struct _Efl_Ui_Win_Data void *trap_data; double aspect; /* defined as w/h or 0 */ - int aspect_w, aspect_h; /* used for the get API */ int size_base_w, size_base_h; int size_step_w, size_step_h; int req_x, req_y, req_w, req_h; @@ -5899,21 +5898,11 @@ _win_aspect_get(Efl_Ui_Win_Data *sd) EOLIAN static void _efl_ui_win_efl_gfx_size_hint_hint_aspect_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, - Efl_Gfx_Size_Hint_Aspect mode EINA_UNUSED, int w, int h) + Efl_Gfx_Size_Hint_Aspect mode, int w, int h) { - pd->aspect_w = w; - pd->aspect_h = h; if (h) _win_aspect_set(pd, (double) w / (double) h); else _win_aspect_set(pd, 0.0); -} - -EOLIAN static void -_efl_ui_win_efl_gfx_size_hint_hint_aspect_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, - Efl_Gfx_Size_Hint_Aspect *mode, int *w, int *h) -{ - if (mode) *mode = EFL_GFX_SIZE_HINT_ASPECT_NONE; - if (w) *w = pd->aspect_w; - if (h) *h = pd->aspect_h; + efl_gfx_size_hint_aspect_set(efl_super(obj, MY_CLASS), mode, w, h); } EOLIAN static void diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 431f73a..bbc1a7f 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -953,7 +953,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, Efl.Screen.screen_size { get; } Efl.Gfx.Size.Hint.hint_base { get; set; } Efl.Gfx.Size.Hint.hint_step { get; set; } - Efl.Gfx.Size.Hint.hint_aspect { get; set; } + Efl.Gfx.Size.Hint.hint_aspect { set; } Efl.Gfx.Size.Hint.hint_max { set; } Efl.Text.text { get; set; } Efl.Input.Interface.pointer_xy { get; } -- 2.7.4