From ee8d8946d96e3c8ee1aba8c640d700a4582d9fb2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 8 Nov 2026 13:07:50 +0100 Subject: [PATCH] fix: show translucent countdown without a panel --- AGENTS.md | 1 + ui/app-window.slint | 43 +++++++++---------------------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2286260..1f71cd4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,3 +9,4 @@ - Size instruction panels to their content and use consistent padding at the screen edges. - Scale branding, icons, typography, and spacing with screen dimensions; cap the centered instruction panel width on large monitors. - The monitor provides room lighting: keep the translucent white overlay on throughout the countdown and until photo capture returns; do not fade it out early. +- Display the countdown as a large semi-transparent number directly over the lighting overlay, without a box or supporting text. diff --git a/ui/app-window.slint b/ui/app-window.slint index 12e76ea..990b5c7 100644 --- a/ui/app-window.slint +++ b/ui/app-window.slint @@ -140,40 +140,15 @@ export component AppWindow inherits Window { active: root.hand-detected; } } - if root.countdown > 0: Rectangle { - x: (root.width - self.width) / 2; - y: (root.height - self.height) / 2; - width: min(420px * root.ui-scale, root.width - root.inset * 2); - height: 340px * root.ui-scale; - border-radius: 32px * root.ui-scale; - background: #fffffff0; - VerticalLayout { - padding: 24px * root.ui-scale; - spacing: 8px * root.ui-scale; - Text { - text: root.countdown; - color: #20302b; - font-size: 180px * root.ui-scale; - font-weight: 700; - horizontal-alignment: center; - vertical-alignment: center; - } - Text { - text: "Bitte in die Kamera schauen."; - color: #20302b; - font-size: 18px * root.ui-scale; - font-weight: 600; - horizontal-alignment: center; - wrap: word-wrap; - } - Text { - text: "Please look at the camera."; - color: #52635d; - font-size: 14px * root.ui-scale; - horizontal-alignment: center; - wrap: word-wrap; - } - } + if root.countdown > 0: Text { + width: root.width; + height: root.height; + text: root.countdown; + color: #20302b77; + font-size: min(240px * root.ui-scale, min(root.width * 0.6, root.height * 0.45)); + font-weight: 700; + horizontal-alignment: center; + vertical-alignment: center; } if root.awaiting-release: Rectangle {