diff --git a/TODO b/TODO index 93104dd..3048837 100644 --- a/TODO +++ b/TODO @@ -11,5 +11,4 @@ * loop all option * show busy anim until opened cb or failure * thumbnail picker show all thumbs for video in a grid to select position -* fix initial sizing in audio mode to account for scaling * add title/album/artis/file display inside window in music mode (at pos?) diff --git a/data/themes/default.edc b/data/themes/default.edc index f1a3a65..9d33632 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -260,6 +260,27 @@ collections { } } + part { name: "prefsize"; type: SPACER; + description { state: "default" 0.0; + rel2.to: "controlbar"; + rel2.relative: 1.0 0.0; + } + description { state: "pref" 0.0; + inherit: "default" 0.0; + min: 160 160; + } + } + program { + signal: "pref,size,on"; source: "rage"; + action: STATE_SET "pref" 0.0; + target: "prefsize"; + } + program { + signal: "pref,size,off"; source: "rage"; + action: STATE_SET "default" 0.0; + target: "prefsize"; + } + part { name: "novid_clip"; type: RECT; description { state: "default" 0.0; } diff --git a/src/bin/win.c b/src/bin/win.c index c03af31..4a706e6 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -461,8 +461,14 @@ win_aspect_adjust(Evas_Object *win) if ((!video_has_video_get(inf->vid)) && (video_has_audio_get(inf->vid))) { - w = 160; - h = 200; + 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; } win_show(win, w, h); } diff --git a/src/bin/winvid.c b/src/bin/winvid.c index c591b2c..d6ab7a1 100644 --- a/src/bin/winvid.c +++ b/src/bin/winvid.c @@ -86,7 +86,16 @@ static void _cb_play_finish(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { Inf *inf = evas_object_data_get(data, "inf"); - if (!inf->playing) win_show(data, 160, 200); + if (!inf->playing) + { + 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"); + win_show(data, mw, mh); + } inf->playing = EINA_FALSE; }