bunch of things
This commit is contained in:
parent
29774b136b
commit
7ad9096277
2 changed files with 25 additions and 46 deletions
|
@ -31,10 +31,6 @@ template $AudreyUiPlayQueue: Adw.Bin {
|
||||||
Picture {
|
Picture {
|
||||||
valign: center;
|
valign: center;
|
||||||
|
|
||||||
styles [
|
|
||||||
"frame"
|
|
||||||
]
|
|
||||||
|
|
||||||
halign: center;
|
halign: center;
|
||||||
paintable: bind template.playing-cover-art;
|
paintable: bind template.playing-cover-art;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,16 +270,13 @@ mod imp {
|
||||||
// only send property change notifications after the event queue is drained
|
// only send property change notifications after the event queue is drained
|
||||||
let freeze_notify = window.freeze_notify();
|
let freeze_notify = window.freeze_notify();
|
||||||
|
|
||||||
let listener = loop {
|
|
||||||
let listener = window.imp().mpv.wakeup_listener();
|
let listener = window.imp().mpv.wakeup_listener();
|
||||||
|
|
||||||
while let Some(event) = window.imp().mpv.wait_event(0.0) {
|
while let Some(event) = window.imp().mpv.wait_event(0.0) {
|
||||||
use crate::mpv::Event;
|
use crate::mpv::Event;
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
Event::PropertyChange(event) => {
|
Event::PropertyChange(event) => window.imp().on_property_change(event),
|
||||||
window.imp().on_property_change(event)
|
|
||||||
}
|
|
||||||
Event::Hook(event) => window.imp().on_hook(event),
|
Event::Hook(event) => window.imp().on_hook(event),
|
||||||
Event::LogMessage(event) => window.imp().on_log_message(event),
|
Event::LogMessage(event) => window.imp().on_log_message(event),
|
||||||
|
|
||||||
|
@ -302,20 +299,6 @@ mod imp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match window.imp().state.get() {
|
|
||||||
State::FileLoaded | State::FileEnded => {
|
|
||||||
// really annoying intermediary states we're not really interested
|
|
||||||
// in seeing outside of this loop
|
|
||||||
// just block until it's done lol
|
|
||||||
use event_listener::Listener;
|
|
||||||
event!(Level::INFO, "blocking");
|
|
||||||
listener.wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
_ => break listener,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// send property change notifications now
|
// send property change notifications now
|
||||||
drop(freeze_notify);
|
drop(freeze_notify);
|
||||||
|
|
||||||
|
@ -649,6 +632,9 @@ mod imp {
|
||||||
self.duration.set(0.0);
|
self.duration.set(0.0);
|
||||||
event!(Level::DEBUG, "duration is now 0 (idle active)");
|
event!(Level::DEBUG, "duration is now 0 (idle active)");
|
||||||
self.obj().notify("duration");
|
self.obj().notify("duration");
|
||||||
|
|
||||||
|
self.obj().set_playing_cover_art(None::<gdk::Texture>);
|
||||||
|
self.obj().set_background(None::<gdk::Texture>);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_start_file(&self) {
|
fn on_start_file(&self) {
|
||||||
|
@ -691,7 +677,7 @@ mod imp {
|
||||||
|
|
||||||
// from g4music
|
// from g4music
|
||||||
let snapshot = gtk::Snapshot::new();
|
let snapshot = gtk::Snapshot::new();
|
||||||
snapshot.push_blur(512.0 * 0.2);
|
snapshot.push_blur(512.0 * 0.1);
|
||||||
snapshot.push_opacity(0.5);
|
snapshot.push_opacity(0.5);
|
||||||
texture.snapshot(&snapshot, 512.0, 512.0);
|
texture.snapshot(&snapshot, 512.0, 512.0);
|
||||||
snapshot.pop();
|
snapshot.pop();
|
||||||
|
@ -794,9 +780,6 @@ mod imp {
|
||||||
|
|
||||||
// cancel queued seek always
|
// cancel queued seek always
|
||||||
self.queued_seek.set(None);
|
self.queued_seek.set(None);
|
||||||
|
|
||||||
self.obj().set_playing_cover_art(None::<gdk::Texture>);
|
|
||||||
self.obj().set_background(None::<gdk::Texture>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
|
|
Loading…
Reference in a new issue