import QtQuick import "../services" as S import "../applets" as C import NovaStats as NS Item { id: root width: 280 property real wavePhase: 0 property real screenWidth: 0 property real unlockFade: 1 // Fly in when wave exits the right edge, latch once fully revealed. // With reducedMotion the wave never runs, so show immediately. property bool _revealed: false on_RawProgressChanged: if (_rawProgress >= 1) _revealed = true readonly property real _rawProgress: S.ThemeUtil.reducedMotion ? 1 : (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0) readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade opacity: _progress property real _slideX: (1 - _progress) * 80 transform: Translate { x: root._slideX } implicitHeight: _widgetContent.implicitHeight visible: _weatherCard.visible || _mprisCard.visible || _volumeCard.visible || _backlightCard.visible || _notifPills.visible Column { id: _widgetContent width: parent.width spacing: 12 // Weather widget Rectangle { id: _weatherCard width: parent.width height: _weatherContent.implicitHeight + 16 radius: NS.ThemeService.radius + 2 color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7) border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3) border.width: 1 visible: (NS.ModulesService.lockWeather ?? true) && S.WeatherService.available C.WeatherApplet { id: _weatherContent anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.topMargin: 8 accentColor: NS.ThemeService.base0C } } // Notification pills LockNotifPills { id: _notifPills anchors.horizontalCenter: parent.horizontalCenter } // Media widget Rectangle { id: _mprisCard width: parent.width height: _mprisContent.implicitHeight + 16 radius: NS.ThemeService.radius + 2 color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7) border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3) border.width: 1 visible: (NS.ModulesService.lockMpris ?? true) && S.MprisService.player !== null C.MprisApplet { id: _mprisContent anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.topMargin: 8 accentColor: NS.ThemeService.base0D } } // Volume widget Rectangle { id: _volumeCard width: parent.width height: _volumeContent.implicitHeight + 16 radius: NS.ThemeService.radius + 2 color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7) border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3) border.width: 1 visible: (NS.ModulesService.lockVolume ?? true) && S.PipewireService.sink !== null C.VolumeApplet { id: _volumeContent anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.topMargin: 8 accentColor: NS.ThemeService.base0E } } // Brightness widget Rectangle { id: _backlightCard width: parent.width height: _backlightContent.implicitHeight + 8 radius: NS.ThemeService.radius + 2 color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7) border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3) border.width: 1 visible: S.BacklightService.available C.BacklightApplet { id: _backlightContent anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.topMargin: 4 percent: S.BacklightService.percent accentColor: NS.ThemeService.base0A onSetPercent: pct => S.BacklightService.setPercent(pct) } } } }