From 00ad4eb62fb8a1bc684bedf60d9e71588d8d47b4 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 8 Aug 2026 11:36:02 +0700 Subject: [PATCH] fix(settings): keep the theme card inside the reading column MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the Chinese and Japanese pages the theme card ran the full width of the window while every other row, and the dividers between them, stopped at 640 — and its "Change theme" chevron, which the card pushes to its right edge, ended up stranded in the middle. The column carries `w_full` under `max_w(640)`, and with nothing definite to resolve the percentage against it falls back to what the content measures, where the card's own row wins over the cap. Give the padding box a width. --- src/ui/settings.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui/settings.rs b/src/ui/settings.rs index b5e7cc1f..5f13c965 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -919,7 +919,14 @@ impl Tty7App { .bg(background) .overflow_y_scroll() .child( - div().px_10().py_8().child( + // The padding box needs its own width for the reading + // column's `w_full` to resolve against something definite; + // without it the percentage falls back to the content, and + // `max_w` loses to a row that measures wider — which is how + // the theme card came to run the width of the window on the + // Chinese and Japanese pages while every other row stopped + // at the column. + div().w_full().px_10().py_8().child( div() .w_full() .max_w(px(640.)) @@ -4460,6 +4467,7 @@ impl Tty7App { })) .child( h_flex() + .w_full() .items_center() .gap_4() .p_3()