From 075533db6a70ad88aab49584f1ed75d2b30b8781 Mon Sep 17 00:00:00 2001 From: Glint Dev Date: Wed, 22 Jul 2026 14:44:28 +0300 Subject: [PATCH] demo: header as always-visible top bar with scrollable body beneath (closest to sticky in Iced) --- examples/demo/app.gltm | 5 ++++- examples/demo/styles.glts | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/demo/app.gltm b/examples/demo/app.gltm index 50f6178..d2518f6 100644 --- a/examples/demo/app.gltm +++ b/examples/demo/app.gltm @@ -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 { diff --git a/examples/demo/styles.glts b/examples/demo/styles.glts index 2cc86fb..e7f2923 100644 --- a/examples/demo/styles.glts +++ b/examples/demo/styles.glts @@ -60,6 +60,13 @@ Panel { } // ── Layout ─────────────────────────────────────────────────────────────────── +.body-scroll { + overflow-y: auto + flex-grow: 1 + padding: 0px + gap: 0px +} + .body { direction: horizontal padding: 12px