From 85ca13aa75576fae78550a2fcbb74c93b69af478 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Wed, 30 Sep 2026 02:17:13 +0800 Subject: [PATCH] [fix] center exclamation mark in update badge --- apps/desktop/src/gui/ui/main_window.slint | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/gui/ui/main_window.slint b/apps/desktop/src/gui/ui/main_window.slint index d017bf0c..c9b18e48 100644 --- a/apps/desktop/src/gui/ui/main_window.slint +++ b/apps/desktop/src/gui/ui/main_window.slint @@ -701,11 +701,27 @@ export component MainWindow inherits Window { accessible-role: button; accessible-label: UiStrings.update-available; accessible-action-default => { root.menu-open = !root.menu-open; } - Text { - text: "!"; color: white; - font-size: 12px; font-weight: 700; - horizontal-alignment: center; vertical-alignment: center; + // Center the visible mark independently of font baseline metrics. + Rectangle { + x: (parent.width - self.width) / 2; + y: (parent.height - self.height) / 2; + width: 2px; + height: 10px; accessible-role: none; + Rectangle { + y: 0px; + width: parent.width; + height: 6px; + border-radius: 1px; + background: white; + } + Rectangle { + y: 8px; + width: parent.width; + height: 2px; + border-radius: 1px; + background: white; + } } TouchArea { mouse-cursor: pointer;