diff --git a/Cargo.toml b/Cargo.toml index b3d1664..cf8e0dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-player" -version = "0.1.36" +version = "0.1.37" edition = "2021" [dependencies] diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 7b6c00d..81b3e3e 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -46,13 +46,13 @@ pub fn render(frame: &mut Frame, state: &mut AppState, player: &mut Player) -> ( // Add playlist counter let playlist_text = if !state.playlist.is_empty() { - format!("Playlist [{}/{}]", state.playlist_index + 1, state.playlist.len()) + format!("playlist [{}/{}]", state.playlist_index + 1, state.playlist.len()) } else { - "Playlist (empty)".to_string() + "playlist (empty)".to_string() }; let title = Line::from(vec![ - Span::styled("Files", file_style), + Span::styled("files", file_style), Span::raw(" | "), Span::styled(playlist_text, playlist_style), ]); @@ -719,42 +719,6 @@ fn render_progress_bar(frame: &mut Frame, _state: &AppState, player: &mut Player frame.render_widget(progress_widget, area); } -fn render_info_popup(frame: &mut Frame, message: &str) { - // Create centered popup area - smaller than confirm popup - let area = frame.area(); - let popup_width = 40; - let popup_height = 3; - - let popup_area = Rect { - x: (area.width.saturating_sub(popup_width)) / 2, - y: (area.height.saturating_sub(popup_height)) / 2, - width: popup_width.min(area.width), - height: popup_height.min(area.height), - }; - - // Use Clear widget to completely erase the background - frame.render_widget(Clear, popup_area); - - // Render the popup block with solid background - let block = Block::default() - .borders(Borders::ALL) - .style(Style::default() - .bg(Theme::background()) - .fg(Theme::bright_foreground())); - - let inner = block.inner(popup_area); - frame.render_widget(block, popup_area); - - // Render message centered - let message_widget = Paragraph::new(message) - .alignment(Alignment::Center) - .style(Style::default() - .fg(Theme::bright_foreground()) - .bg(Theme::background())); - - frame.render_widget(message_widget, inner); -} - fn render_refresh_popup(frame: &mut Frame, file_count: usize) { // Create centered popup area - bigger for two lines let area = frame.area();