feat(ui): theme the TUI with the soulseek-rs design system

Replace the ANSI Light* palette with the design system's tokens
(tokens/colors.css): oxide accent, phosphor focus, tape/signal/alarm
semantics, paper text on dust chrome. Only foregrounds and the row
highlight are painted so the user's terminal background shows through.

Route every bordered pane through a single pane_block() helper carrying
one column of horizontal padding, and give legends a consistent
[n] Title form with the tag in signal. The command bar now derives its
cursor position from the block's inner rect instead of a hardcoded
border offset.

Also collapses the download-status glyph match that was duplicated
across three render sites into download_status_glyph().
This commit is contained in:
Michel de Graaf
2026-07-24 21:18:20 +02:00
parent 2c29e1a39b
commit 105c798855
11 changed files with 362 additions and 365 deletions
+6 -12
View File
@@ -1,12 +1,12 @@
use crate::models::{SearchEntry, SearchStatus};
use crate::ui::{
HIGHLIGHT_SYMBOL, border_style, border_type, header_style, highlight_style,
success_style, warning_style,
HIGHLIGHT_SYMBOL, body_style, dimmed_style, header_style, highlight_style,
pane_block, pane_title, success_style, warning_style,
};
use ratatui::{
Frame,
layout::Rect,
widgets::{Block, Borders, Cell, HighlightSpacing, Row, Table, TableState},
widgets::{Cell, HighlightSpacing, Row, Table, TableState},
};
pub fn render_searches_pane(
@@ -46,8 +46,8 @@ pub fn render_searches_pane(
Row::new(vec![
status_cell,
Cell::from(search.query.clone()),
Cell::from(results_text),
Cell::from(search.query.clone()).style(body_style()),
Cell::from(results_text).style(dimmed_style()),
])
})
.collect();
@@ -63,13 +63,7 @@ pub fn render_searches_pane(
.row_highlight_style(highlight_style())
.highlight_symbol(HIGHLIGHT_SYMBOL)
.highlight_spacing(HighlightSpacing::Always)
.block(
Block::default()
.borders(Borders::ALL)
.border_style(border_style(focused))
.border_type(border_type(focused))
.title("[1] Searches"),
);
.block(pane_block(focused).title(pane_title("1", "Searches", focused)));
frame.render_stateful_widget(table, area, table_state);
}