Replace playlist selection with bold colored text
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
- Current track shown with bold text instead of selection highlight - Green bold for playing, blue for paused, yellow for stopped - Cleaner visual appearance - Bump version to 0.1.8
This commit is contained in:
parent
f9534bacf3
commit
1b07026b68
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-player"
|
||||
version = "0.1.7"
|
||||
version = "0.1.8"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -96,17 +96,20 @@ fn render_right_panel(frame: &mut Frame, state: &AppState, area: Rect) {
|
||||
.unwrap_or_else(|| path.to_string_lossy().to_string());
|
||||
|
||||
let style = if idx == state.playlist_index {
|
||||
// Color based on player state
|
||||
// Color based on player state with bold text
|
||||
match state.player_state {
|
||||
PlayerState::Playing => Style::default()
|
||||
.fg(Theme::background())
|
||||
.bg(Theme::success()), // Green
|
||||
.fg(Theme::success()) // Green text
|
||||
.bg(Theme::background())
|
||||
.add_modifier(Modifier::BOLD),
|
||||
PlayerState::Paused => Style::default()
|
||||
.fg(Theme::background())
|
||||
.bg(Theme::highlight()), // Blue
|
||||
.fg(Theme::highlight()) // Blue text
|
||||
.bg(Theme::background())
|
||||
.add_modifier(Modifier::BOLD),
|
||||
PlayerState::Stopped => Style::default()
|
||||
.fg(Theme::background())
|
||||
.bg(Theme::warning()), // Yellow/orange
|
||||
.fg(Theme::warning()) // Yellow/orange text
|
||||
.bg(Theme::background())
|
||||
.add_modifier(Modifier::BOLD),
|
||||
}
|
||||
} else {
|
||||
Theme::secondary()
|
||||
@ -132,9 +135,7 @@ fn render_right_panel(frame: &mut Frame, state: &AppState, area: Rect) {
|
||||
);
|
||||
|
||||
let mut playlist_state = ListState::default();
|
||||
if !state.playlist.is_empty() {
|
||||
playlist_state.select(Some(state.playlist_index));
|
||||
}
|
||||
// Don't set selection - use bold text instead
|
||||
frame.render_stateful_widget(playlist_widget, area, &mut playlist_state);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user