Skip to content

Commit

Permalink
gui: handle Repeat::QueuePause
Browse files Browse the repository at this point in the history
  • Loading branch information
hinto-janai committed Feb 25, 2024
1 parent 6f57310 commit ee56637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions gui/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion gui/src/ui/queue.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ee56637

Please sign in to comment.