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
+4 -11
View File
@@ -1,17 +1,14 @@
use crate::models::{BrowseState, BrowseStatus, BrowseTabs};
use crate::ui::{
HIGHLIGHT_SYMBOL, border_style, border_type, dimmed_style, error_style,
format_bytes, get_spinner_char, highlight_style, primary_style,
HIGHLIGHT_SYMBOL, dimmed_style, error_style, format_bytes,
get_spinner_char, highlight_style, pane_block, primary_style,
};
use ratatui::{
Frame,
layout::{Constraint, Layout, Rect},
style::Modifier,
text::{Line, Span},
widgets::{
Block, Borders, Cell, HighlightSpacing, Paragraph, Row, Table,
TableState,
},
widgets::{Cell, HighlightSpacing, Paragraph, Row, Table, TableState},
};
/// Render the browse popup: a tab bar of browsed users (when more than one is
@@ -70,11 +67,7 @@ fn render_browse_one(
),
_ => format!(" Browse {} ", browse.username),
};
let block = Block::default()
.borders(Borders::ALL)
.border_style(border_style(true))
.border_type(border_type(true))
.title(title);
let block = pane_block(true).title(title);
match browse.status {
BrowseStatus::Loading => {