From ee56637e4fdf820375abb2929351722d3f7fd54d Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Sun, 25 Feb 2024 10:54:18 -0500 Subject: [PATCH] gui: handle `Repeat::QueuePause` --- gui/src/text.rs | 1 + gui/src/ui/queue.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/src/text.rs b/gui/src/text.rs index b1e426e0..43ece7e3 100644 --- a/gui/src/text.rs +++ b/gui/src/text.rs @@ -66,6 +66,7 @@ pub const VOLUME_SLIDER: &str = "Increase/decrease audio volume"; pub const SHUFFLE_OFF: &str = "Shuffle is turned off"; pub const REPEAT_SONG: &str = "The current song will be repeated forever"; pub const REPEAT_QUEUE: &str = "The current queue will be repeated forever"; +pub const REPEAT_QUEUE_PAUSE: &str = "The current queue will be repeated forever, but will start paused"; pub const REPEAT_OFF: &str = "Repeat is turned off"; //---------------------------------------------------------------------------------------------------- Bottom Bar diff --git a/gui/src/ui/queue.rs b/gui/src/ui/queue.rs index f5a0dfc2..c5fad81a 100644 --- a/gui/src/ui/queue.rs +++ b/gui/src/ui/queue.rs @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------------------------- Use use crate::constants::{ BONE,GRAY,YELLOW,GREEN,MEDIUM_GRAY, - QUEUE_ALBUM_ART_SIZE, + QUEUE_ALBUM_ART_SIZE,WHITE, }; use crate::text::{ UI_QUEUE_CLEAR,UI_QUEUE_SHUFFLE,UI_MINUS, @@ -11,6 +11,7 @@ use crate::text::{ UI_QUEUE_SHUFFLE_SONG,QUEUE_SHUFFLE_SONG, QUEUE_LENGTH,QUEUE_RUNTIME, UI_REPEAT_SONG,UI_REPEAT,REPEAT_SONG,REPEAT_QUEUE,REPEAT_OFF, + REPEAT_QUEUE_PAUSE, }; use shukusai::kernel::{ FrontendToKernel, @@ -87,6 +88,7 @@ pub fn show_tab_queue(&mut self, ui: &mut egui::Ui, ctx: &egui::Context, width: let (icon, text, color) = match self.state.repeat { Repeat::Song => (UI_REPEAT_SONG, REPEAT_SONG, YELLOW), Repeat::Queue => (UI_REPEAT, REPEAT_QUEUE, GREEN), + Repeat::QueuePause => (UI_REPEAT, REPEAT_QUEUE_PAUSE, WHITE), Repeat::Off => (UI_REPEAT, REPEAT_OFF, MEDIUM_GRAY), }; let button = Button::new(