Formatting

This commit is contained in:
quadbyte 2025-08-13 09:33:45 -04:00
parent c3304818f1
commit 5fd0e57b91
7 changed files with 28 additions and 40 deletions

View file

@ -20,7 +20,7 @@ NLoader {
// Start hide animation // Start hide animation
notificationRect.scaleValue = 0.8 notificationRect.scaleValue = 0.8
notificationRect.opacityValue = 0.0 notificationRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -32,7 +32,7 @@ NLoader {
// Start hide animation // Start hide animation
notificationRect.scaleValue = 0.8 notificationRect.scaleValue = 0.8
notificationRect.opacityValue = 0.0 notificationRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -44,7 +44,7 @@ NLoader {
// Start hide animation // Start hide animation
notificationRect.scaleValue = 0.8 notificationRect.scaleValue = 0.8
notificationRect.opacityValue = 0.0 notificationRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -94,7 +94,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationSlow duration: Style.animationSlow
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
} }
} }
@ -102,7 +101,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationNormal duration: Style.animationNormal
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }

View file

@ -122,13 +122,13 @@ Item {
NPanel { NPanel {
id: trayPanel id: trayPanel
showOverlay: false // no colors overlay even if activated in settings showOverlay: false // no colors overlay even if activated in settings
// Override hide function to animate first // Override hide function to animate first
function hide() { function hide() {
// Start hide animation // Start hide animation
trayMenuRect.scaleValue = 0.8 trayMenuRect.scaleValue = 0.8
trayMenuRect.opacityValue = 0.0 trayMenuRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -136,11 +136,11 @@ Item {
Connections { Connections {
target: trayPanel target: trayPanel
ignoreUnknownSignals: true ignoreUnknownSignals: true
function onDismissed() { function onDismissed() {
// Start hide animation // Start hide animation
trayMenuRect.scaleValue = 0.8 trayMenuRect.scaleValue = 0.8
trayMenuRect.opacityValue = 0.0 trayMenuRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -148,11 +148,11 @@ Item {
// Also handle visibility changes from external sources // Also handle visibility changes from external sources
onVisibleChanged: { onVisibleChanged: {
if (!visible && trayMenuRect.opacityValue > 0) { if (!visible && trayMenuRect.opacityValue > 0) {
// Start hide animation // Start hide animation
trayMenuRect.scaleValue = 0.8 trayMenuRect.scaleValue = 0.8
trayMenuRect.opacityValue = 0.0 trayMenuRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -192,7 +192,6 @@ Item {
NumberAnimation { NumberAnimation {
duration: Style.animationSlow duration: Style.animationSlow
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
} }
} }
@ -200,7 +199,6 @@ Item {
NumberAnimation { NumberAnimation {
duration: Style.animationNormal duration: Style.animationNormal
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }

View file

@ -21,7 +21,7 @@ NLoader {
function hide() { function hide() {
wifiMenuRect.scaleValue = 0.8 wifiMenuRect.scaleValue = 0.8
wifiMenuRect.opacityValue = 0.0 wifiMenuRect.opacityValue = 0.0
hideTimer.start() hideTimer.start()
} }
@ -33,7 +33,7 @@ NLoader {
// Start hide animation // Start hide animation
wifiMenuRect.scaleValue = 0.8 wifiMenuRect.scaleValue = 0.8
wifiMenuRect.opacityValue = 0.0 wifiMenuRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -45,7 +45,7 @@ NLoader {
// Start hide animation // Start hide animation
wifiMenuRect.scaleValue = 0.8 wifiMenuRect.scaleValue = 0.8
wifiMenuRect.opacityValue = 0.0 wifiMenuRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }

View file

@ -20,7 +20,7 @@ NLoader {
// Start hide animation // Start hide animation
calendarRect.scaleValue = 0.8 calendarRect.scaleValue = 0.8
calendarRect.opacityValue = 0.0 calendarRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -32,7 +32,7 @@ NLoader {
// Start hide animation // Start hide animation
calendarRect.scaleValue = 0.8 calendarRect.scaleValue = 0.8
calendarRect.opacityValue = 0.0 calendarRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -44,7 +44,7 @@ NLoader {
// Start hide animation // Start hide animation
calendarRect.scaleValue = 0.8 calendarRect.scaleValue = 0.8
calendarRect.opacityValue = 0.0 calendarRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -97,7 +97,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationSlow duration: Style.animationSlow
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
} }
} }
@ -105,7 +104,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationNormal duration: Style.animationNormal
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }

View file

@ -20,7 +20,7 @@ NLoader {
// Start hide animation // Start hide animation
bgRect.scaleValue = 0.8 bgRect.scaleValue = 0.8
bgRect.opacityValue = 0.0 bgRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -32,7 +32,7 @@ NLoader {
// Start hide animation // Start hide animation
bgRect.scaleValue = 0.8 bgRect.scaleValue = 0.8
bgRect.opacityValue = 0.0 bgRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -44,7 +44,7 @@ NLoader {
// Start hide animation // Start hide animation
bgRect.scaleValue = 0.8 bgRect.scaleValue = 0.8
bgRect.opacityValue = 0.0 bgRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -99,7 +99,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationSlow duration: Style.animationSlow
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
} }
} }
@ -107,7 +106,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationNormal duration: Style.animationNormal
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }

View file

@ -46,7 +46,7 @@ NLoader {
// Start hide animation // Start hide animation
panelBackground.scaleValue = 0.8 panelBackground.scaleValue = 0.8
panelBackground.opacityValue = 0.0 panelBackground.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -58,7 +58,7 @@ NLoader {
// Start hide animation // Start hide animation
panelBackground.scaleValue = 0.8 panelBackground.scaleValue = 0.8
panelBackground.opacityValue = 0.0 panelBackground.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -70,7 +70,7 @@ NLoader {
// Start hide animation // Start hide animation
panelBackground.scaleValue = 0.8 panelBackground.scaleValue = 0.8
panelBackground.opacityValue = 0.0 panelBackground.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }
@ -110,8 +110,6 @@ NLoader {
opacityValue = 1.0 opacityValue = 1.0
} }
// Timer to hide panel after animation // Timer to hide panel after animation
Timer { Timer {
id: hideTimer id: hideTimer
@ -133,7 +131,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationSlow duration: Style.animationSlow
easing.type: Easing.OutExpo easing.type: Easing.OutExpo
} }
} }
@ -141,7 +138,6 @@ NLoader {
NumberAnimation { NumberAnimation {
duration: Style.animationNormal duration: Style.animationNormal
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
} }

View file

@ -55,12 +55,12 @@ Window {
x = pos.x - width / 2 + target.width / 2 x = pos.x - width / 2 + target.width / 2
y = pos.y + 12 // 12 px margin below y = pos.y + 12 // 12 px margin below
} }
// Start with animation values // Start with animation values
tooltipRect.scaleValue = 0.8 tooltipRect.scaleValue = 0.8
tooltipRect.opacityValue = 0.0 tooltipRect.opacityValue = 0.0
visible = true visible = true
// Use a timer to trigger the animation after the component is visible // Use a timer to trigger the animation after the component is visible
showTimer.start() showTimer.start()
} }
@ -69,7 +69,7 @@ Window {
// Start hide animation // Start hide animation
tooltipRect.scaleValue = 0.8 tooltipRect.scaleValue = 0.8
tooltipRect.opacityValue = 0.0 tooltipRect.opacityValue = 0.0
// Hide after animation completes // Hide after animation completes
hideTimer.start() hideTimer.start()
} }