raster pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=d41b44b07a60f753efc58c737a35e72edad51caf

commit d41b44b07a60f753efc58c737a35e72edad51caf
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Apr 27 13:33:07 2020 +0100

    n key - in music mode have it drop win size back to fit the albumart
    
    if you press n - it'll normalize the window size given the current
    media and now for audio it'l go "Square" or the size it'd use if you
    launched it to begin with on a music file.
---
 src/bin/key.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/bin/key.c b/src/bin/key.c
index 5b56678..022d15c 100644
--- a/src/bin/key.c
+++ b/src/bin/key.c
@@ -191,6 +191,18 @@ key_handle(Evas_Object *win, Evas_Event_Key_Down *ev)
         if (browser_visible()) return;
         video_ratio_size_get(inf->vid, &w, &h);
         if ((w > 1) && (h > 1)) evas_object_resize(win, w, h);
+        else
+          {
+             Evas_Coord mw = 1, mh = 1;
+
+             elm_layout_signal_emit(inf->lay, "pref,size,on", "rage");
+             edje_object_message_signal_process(elm_layout_edje_get(inf->lay));
+             edje_object_size_min_calc(elm_layout_edje_get(inf->lay), &mw, 
&mh);
+             elm_layout_signal_emit(inf->lay, "pref,size,off", "rage");
+             w = mw;
+             h = mh;
+             if ((w > 1) && (h > 1)) evas_object_resize(win, w, h);
+          }
      }
    else if (!strcmp(ev->keyname, "backslash"))
      {

-- 


Reply via email to