Use lowercase for panel labels
All checks were successful
Build and Release / build-and-release (push) Successful in 54s

Change "Files" to "files" and "Playlist" to "playlist" in the title bar
for consistent lowercase styling. Also remove unused render_info_popup
function.
This commit is contained in:
2025-12-13 12:58:06 +01:00
parent cddfedf1a0
commit 2953d73487
2 changed files with 4 additions and 40 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "cm-player"
version = "0.1.36"
version = "0.1.37"
edition = "2021"
[dependencies]

View File

@@ -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();