merge: epoch-1.10.0 d'upstream

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lionel DARNIS 2026-10-11 07:00:06 +02:00
commit 1d3445b1c3
14 changed files with 653 additions and 381 deletions

View file

@ -350,6 +350,8 @@ pub enum Message {
VideoAreaClick,
PlaybackSpeed(f64),
ShowControls,
ControlsHoverEnter,
ControlsHoverExit,
SystemThemeModeChange(cosmic_theme::ThemeMode),
ToggleAbout,
WindowClose,
@ -363,6 +365,7 @@ pub struct App {
album_art_opt: Option<tempfile::NamedTempFile>,
controls: bool,
controls_time: Instant,
controls_hovered: bool,
dropdown_opt: Option<DropdownKind>,
fullscreen: bool,
key_binds: HashMap<KeyBind, Action>,
@ -661,6 +664,7 @@ impl App {
fn update_controls(&mut self, in_use: bool) {
if in_use
|| self.controls_hovered
|| !self
.video_opt
.as_ref()
@ -959,6 +963,7 @@ impl Application for App {
album_art_opt: None,
controls: true,
controls_time: Instant::now(),
controls_hovered: false,
dropdown_opt: None,
fullscreen: false,
key_binds: key_binds(),
@ -1696,6 +1701,18 @@ impl Application for App {
Message::ShowControls => {
self.update_controls(true);
}
Message::ControlsHoverEnter => {
if !self.controls_hovered {
self.controls_hovered = true;
self.update_controls(true);
}
}
Message::ControlsHoverExit => {
if self.controls_hovered {
self.controls_hovered = false;
self.update_controls(false);
}
}
Message::SystemThemeModeChange(_theme_mode) => {
return self.update_config();
}
@ -2165,7 +2182,11 @@ impl Application for App {
}
}
if !popup_items.is_empty() {
popover = popover.popup(widget::column::with_children(popup_items));
popover = popover.popup(
widget::mouse_area(widget::column::with_children(popup_items))
.on_enter(Message::ControlsHoverEnter)
.on_exit(Message::ControlsHoverExit),
);
}
widget::container(popover)