From 41cab6fa0bd8d889b624a22681141244e2680f8f Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 25 Sep 2026 03:26:49 +0800 Subject: [PATCH] [fix] render toolbar off-state slashes correctly in software mode --- apps/desktop/src/gui/ui/stream_window.slint | 30 ++++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/apps/desktop/src/gui/ui/stream_window.slint b/apps/desktop/src/gui/ui/stream_window.slint index f0537627..d7642578 100644 --- a/apps/desktop/src/gui/ui/stream_window.slint +++ b/apps/desktop/src/gui/ui/stream_window.slint @@ -115,23 +115,21 @@ component ControlBarButton inherits Rectangle { font-size: 11px; } - // Match the two offset diagonal strokes used by the ImGui mouse/audio - // disabled state instead of covering the glyph with a full-width slash. - if root.slashed: Rectangle { - x: 11px; - y: 0px; - width: 2px; - height: 24px; - background: black; - transform-rotation: -45deg; + // Draw the two offset disabled-state strokes as paths. Rotated rectangles + // stay vertical in the software renderer used for fallback and UI capture. + if root.slashed: Path { + width: 24px; height: 24px; + viewbox-width: 24; viewbox-height: 24; + commands: "M 3.5 3.5 L 20.5 20.5"; + stroke: black; + stroke-width: 2px; } - if root.slashed: Rectangle { - x: 9.5px; - y: 1.5px; - width: 2px; - height: 24px; - background: touch.has-hover ? #4296fa : #b3d5fd; - transform-rotation: -45deg; + if root.slashed: Path { + width: 24px; height: 24px; + viewbox-width: 24; viewbox-height: 24; + commands: "M 2 5 L 19 22"; + stroke: touch.has-hover ? #4296fa : #b3d5fd; + stroke-width: 2px; } touch := TouchArea {