app: scroll the log box and give it more height
Two hundred lines of log did not fit the card, so the text ran past the card's edge. The box is a scroll viewport now, 440 points tall, pinned to its newest line until the reader scrolls, with its own bar in the strip the padding leaves. It sits inside the settings scroller, so both bars share the screen and the log takes the wheel while the pointer is over it.
This commit is contained in:
1 parent
42ba0ce882
commit
046860ad1c
2 files changed
+28
-10
No files matched your search
+21
-10
@@ -1081,16 +1081,27 @@ fn advanced(app: &App, p: Paint, kit: &rune_kit::Kit, layer: &mut Vec<El>, conte
|
||||
p,
|
||||
Some("Log"),
|
||||
vec![
|
||||
col().key("log").padding(space::S3).h(300.0).gap(0.0).child(
|
||||
text(if app.logs.is_empty() {
|
||||
"No log loaded. Press Reload log."
|
||||
} else {
|
||||
&app.logs
|
||||
})
|
||||
.key("log-text")
|
||||
.font(type_::MONO_CAPTION)
|
||||
.color(p.muted())
|
||||
.w_full(),
|
||||
app.log_scroll.follow(
|
||||
"log-scroller",
|
||||
col()
|
||||
.key("log")
|
||||
.padding(space::S3)
|
||||
// Room for the scroll bar the box draws at the viewport's end edge.
|
||||
.pr(14.0)
|
||||
.h(440.0)
|
||||
.gap(0.0)
|
||||
.scroll(rune::ScrollSpec { stick_bottom: true })
|
||||
.child(
|
||||
text(if app.logs.is_empty() {
|
||||
"No log loaded. Press Reload log."
|
||||
} else {
|
||||
&app.logs
|
||||
})
|
||||
.key("log-text")
|
||||
.font(type_::MONO_CAPTION)
|
||||
.color(p.muted())
|
||||
.w_full(),
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user