Add notch speeds and a glassy-when-open option

- Settings → Notch → Look: separate opening, closing and colour-change
  speeds for the notch and the notch-mode launcher.
- "Glassy when open" keeps the custom colour/opacity on the docked notch
  and fades the open notch and launcher back to the normal glass; closing
  never outlasts the shrink, so it docks in the docked colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-12 17:24:31 +01:00
1 parent e4ca1f5d9c
commit efaace0f15
9 files changed
+87 -19

No files matched your search

+14
View File
@@ -40,6 +40,20 @@ Singleton {
const o = n ? Math.max(0, Math.min(100, n.opacity)) / 100 : 0;
return Qt.alpha(c, glassOpacity + (1 - glassOpacity) * o);
}
// The open notch's fill: the plain glass when "glassy when open" is on.
readonly property color notchOpenFill: ConfigService.ready && ConfigService.data.notch.glassOnOpen ? Qt.alpha(tint, glassOpacity) : notchFill
// Notch animations run at their own speeds (percent; 100 follows the shell),
// one for opening and one for closing.
readonly property real notchOpenDuration: duration * 100 / (ConfigService.ready ? Math.max(25, ConfigService.data.notch.openSpeed) : 100)
readonly property real notchCloseDuration: duration * 100 / (ConfigService.ready ? Math.max(25, ConfigService.data.notch.closeSpeed) : 100)
// Docked colour to the open fill and back (only differs with "glassy when open").
readonly property real notchColorDuration: duration * 0.6 * 100 / (ConfigService.ready ? Math.max(25, ConfigService.data.notch.colorSpeed) : 100)
// Motion inside the open notch (pages, tiles, the pill's width) uses the opening speed.
readonly property real notchDuration: notchOpenDuration
function mixColor(a, b, t) {
const k = Math.max(0, Math.min(1, t));
return Qt.rgba(a.r + (b.r - a.r) * k, a.g + (b.g - a.g) * k, a.b + (b.b - a.b) * k, a.a + (b.a - a.a) * k);
}
readonly property color surfaceVariant: Qt.alpha(tint, 0.38)
readonly property color fill: Qt.alpha(tint, 0.22)
readonly property color hover: Qt.alpha(text, 0.09)