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]
|
[package]
|
||||||
name = "cm-player"
|
name = "cm-player"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[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());
|
.unwrap_or_else(|| path.to_string_lossy().to_string());
|
||||||
|
|
||||||
let style = if idx == state.playlist_index {
|
let style = if idx == state.playlist_index {
|
||||||
// Color based on player state
|
// Color based on player state with bold text
|
||||||
match state.player_state {
|
match state.player_state {
|
||||||
PlayerState::Playing => Style::default()
|
PlayerState::Playing => Style::default()
|
||||||
.fg(Theme::background())
|
.fg(Theme::success()) // Green text
|
||||||
.bg(Theme::success()), // Green
|
.bg(Theme::background())
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
PlayerState::Paused => Style::default()
|
PlayerState::Paused => Style::default()
|
||||||
.fg(Theme::background())
|
.fg(Theme::highlight()) // Blue text
|
||||||
.bg(Theme::highlight()), // Blue
|
.bg(Theme::background())
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
PlayerState::Stopped => Style::default()
|
PlayerState::Stopped => Style::default()
|
||||||
.fg(Theme::background())
|
.fg(Theme::warning()) // Yellow/orange text
|
||||||
.bg(Theme::warning()), // Yellow/orange
|
.bg(Theme::background())
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Theme::secondary()
|
Theme::secondary()
|
||||||
@ -132,9 +135,7 @@ fn render_right_panel(frame: &mut Frame, state: &AppState, area: Rect) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let mut playlist_state = ListState::default();
|
let mut playlist_state = ListState::default();
|
||||||
if !state.playlist.is_empty() {
|
// Don't set selection - use bold text instead
|
||||||
playlist_state.select(Some(state.playlist_index));
|
|
||||||
}
|
|
||||||
frame.render_stateful_widget(playlist_widget, area, &mut playlist_state);
|
frame.render_stateful_widget(playlist_widget, area, &mut playlist_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user