From 0eeea075717b57deee228ccb849f15205d67e8d0 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 8 Aug 2026 21:08:59 +0700 Subject: [PATCH] fix(settings): round the theme card the way the theme panel rounds it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Appearance page and the theme panel draw the same object — a theme preview, its name, a border — and drew it differently. The page card was rounded_xl, the only 12px corner in the app, while the panel card that opens from it uses TRACK_RADIUS. Worse, the preview inside the page card kept its own 8px corners inside a 12px border, the concentric mismatch that rounding::inner_radius exists to prevent; the panel already insets its copy of that same preview. Both now use TRACK_RADIUS with the preview inset by the hairline, and theme_preview names the token instead of repeating its value. --- src/ui/settings.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ui/settings.rs b/src/ui/settings.rs index 0b5b55eb..7d2e6842 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -4526,7 +4526,7 @@ impl Tty7App { v_flex() .w_full() .bg(rgb(p.background_color())) - .rounded(px(8.)) + .rounded(rounding::TRACK_RADIUS) .overflow_hidden() .px_3() .py_3() @@ -4633,7 +4633,12 @@ impl Tty7App { .rounded(px(3.)) .bg(rgb(to_u32(active.ansi16[i]))) })); - let preview = self.theme_preview(&active); + // Inset inside the card's border, the way the same preview is inset + // inside the same card in the theme panel. + let preview = self.theme_preview(&active).rounded(rounding::inner_radius( + rounding::TRACK_RADIUS, + rounding::HAIRLINE, + )); let open = self .active_settings() .is_some_and(|s| s.theme_panel_open && s.theme_panel_slot == slot); @@ -4653,7 +4658,7 @@ impl Tty7App { .items_center() .gap_4() .p_3() - .rounded_xl() + .rounded(rounding::TRACK_RADIUS) .border_1() .border_color(if open { foreground.opacity(0.35)