rage - fix preferred sizing for audio

v-0.4.0
Carsten Haitzler 8 years ago
parent b32afb8c55
commit 4bbc18d17a
  1. 1
      TODO
  2. 21
      data/themes/default.edc
  3. 10
      src/bin/win.c
  4. 11
      src/bin/winvid.c

@ -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?)

@ -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;
}

@ -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);
}

@ -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;
}

Loading…
Cancel
Save