mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
fix(settings): keep the theme card inside the reading column
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.
This commit is contained in:
+9
-1
@@ -919,7 +919,14 @@ impl Tty7App {
|
|||||||
.bg(background)
|
.bg(background)
|
||||||
.overflow_y_scroll()
|
.overflow_y_scroll()
|
||||||
.child(
|
.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()
|
div()
|
||||||
.w_full()
|
.w_full()
|
||||||
.max_w(px(640.))
|
.max_w(px(640.))
|
||||||
@@ -4460,6 +4467,7 @@ impl Tty7App {
|
|||||||
}))
|
}))
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
|
.w_full()
|
||||||
.items_center()
|
.items_center()
|
||||||
.gap_4()
|
.gap_4()
|
||||||
.p_3()
|
.p_3()
|
||||||
|
|||||||
Reference in New Issue
Block a user