demo: header as always-visible top bar with scrollable body beneath (closest to sticky in Iced)
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
// ── 3. Layout ────────────────────────────────────────────────────────────────
|
||||
Window(title=$title) {
|
||||
|
||||
// ── Sticky Header ────────────────────────────────────────────────────────
|
||||
// ── Header (stays at top, body scrolls beneath) ──────────────────────────
|
||||
Panel(class="header") {
|
||||
Panel(class="header-inner") {
|
||||
Icon "◇"
|
||||
@@ -74,6 +74,8 @@ Window(title=$title) {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Scrollable body ─────────────────────────────────────────────────────
|
||||
Panel(class="body-scroll") {
|
||||
Panel(class="body") {
|
||||
|
||||
// ── LEFT COLUMN ──────────────────────────────────────────────────────
|
||||
@@ -249,6 +251,7 @@ Window(title=$title) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Fixed Toast ──────────────────────────────────────────────────────────
|
||||
@if $notif {
|
||||
|
||||
@@ -60,6 +60,13 @@ Panel {
|
||||
}
|
||||
|
||||
// ── Layout ───────────────────────────────────────────────────────────────────
|
||||
.body-scroll {
|
||||
overflow-y: auto
|
||||
flex-grow: 1
|
||||
padding: 0px
|
||||
gap: 0px
|
||||
}
|
||||
|
||||
.body {
|
||||
direction: horizontal
|
||||
padding: 12px
|
||||
|
||||
Reference in New Issue
Block a user