diff --git a/Bar/Bar.qml b/Bar/Bar.qml index 986bacc..fe657d3 100644 --- a/Bar/Bar.qml +++ b/Bar/Bar.qml @@ -110,6 +110,7 @@ Scope { Brightness { id: widgetsBrightness + screen: modelData anchors.verticalCenter: parent.verticalCenter } @@ -251,4 +252,4 @@ Scope { // This alias exposes the visual bar's visibility to the outside world property alias visible: barRootItem.visible -} \ No newline at end of file +} diff --git a/Services/WallpaperManager.qml b/Services/WallpaperManager.qml index 64d1cad..3b50d9a 100644 --- a/Services/WallpaperManager.qml +++ b/Services/WallpaperManager.qml @@ -91,7 +91,7 @@ Singleton { FolderListModel { id: folderModel - nameFilters: ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"] + nameFilters: Settings.settings.useSWWW ? ["*.avif", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.tga", "*.tiff", "*.webp", "*.bmp", "*.farbfeld"] : ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"] showDirs: false sortField: FolderListModel.Name onStatusChanged: { diff --git a/Widgets/Notification/NotificationIcon.qml b/Widgets/Notification/NotificationIcon.qml index 04d37f2..429fd1b 100644 --- a/Widgets/Notification/NotificationIcon.qml +++ b/Widgets/Notification/NotificationIcon.qml @@ -34,7 +34,7 @@ Item { hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: function(mouse): void { + onClicked: function(mouse) { if (mouse.button === Qt.RightButton) { root.isSilence = !root.isSilence; rightClickProcess.running = true; @@ -60,4 +60,4 @@ Item { targetItem: bell delay: 200 } -} \ No newline at end of file +} diff --git a/Widgets/Sidebar/Panel/PanelPopup.qml b/Widgets/Sidebar/Panel/PanelPopup.qml index a656072..1a68a23 100644 --- a/Widgets/Sidebar/Panel/PanelPopup.qml +++ b/Widgets/Sidebar/Panel/PanelPopup.qml @@ -59,15 +59,15 @@ PanelWithOverlay { if (sidebarPopupRect.settingsModal && sidebarPopupRect.settingsModal.visible) { sidebarPopupRect.settingsModal.visible = false; } - if (sidebarPopupRect.wallpaperPanelModal && sidebarPopupRect.wallpaperPanelModal.visible) { - sidebarPopupRect.wallpaperPanelModal.visible = false; + if (wallpaperPanelLoader && wallpaperPanelLoader.active) { + wallpaperPanelLoader.active = false; + } + if (sidebarPopupRect.wifiPanelModal && sidebarPopupRect.wifiPanelModal.visible) { + sidebarPopupRect.wifiPanelModal.visible = false; + } + if (sidebarPopupRect.bluetoothPanelModal && sidebarPopupRect.bluetoothPanelModal.visible) { + sidebarPopupRect.bluetoothPanelModal.visible = false; } - if (sidebarPopupRect.wifiPanelModal && sidebarPopupRect.wifiPanelModal.visible) { - sidebarPopupRect.wifiPanelModal.visible = false; - } - if (sidebarPopupRect.bluetoothPanelModal && sidebarPopupRect.bluetoothPanelModal.visible) { - sidebarPopupRect.bluetoothPanelModal.visible = false; - } if (sidebarPopup.visible) { slideAnim.from = 0; slideAnim.to = width; @@ -125,7 +125,6 @@ PanelWithOverlay { } property alias settingsModal: settingsModal - property alias wallpaperPanelModal: wallpaperPanelModal property alias wifiPanelModal: wifiPanel.panel property alias bluetoothPanelModal: bluetoothPanel.panel SettingsModal { @@ -313,9 +312,7 @@ PanelWithOverlay { onSettingsRequested: { settingsModal.visible = true; } - onWallpaperRequested: { - wallpaperPanelModal.visible = true; - } + onWallpaperRequested: wallpaperPanelLoader.active = true; } } Keys.onEscapePressed: sidebarPopupRect.hidePopup() @@ -402,16 +399,20 @@ PanelWithOverlay { } } - WallpaperPanel { - id: wallpaperPanelModal - visible: false - Component.onCompleted: { - if (parent) { - wallpaperPanelModal.anchors.top = parent.top; - wallpaperPanelModal.anchors.right = parent.right; + LazyLoader { + id: wallpaperPanelLoader + loading: false + + WallpaperPanel { + // Need to keep this visible so it shows once loaded + visible: true + Component.onCompleted: { + if (parent) { + anchors.top = parent.top; + anchors.right = parent.right; + } } } - // Add a close button inside WallpaperPanel.qml for user to close the modal } } } diff --git a/Widgets/Sidebar/Panel/WallpaperPanel.qml b/Widgets/Sidebar/Panel/WallpaperPanel.qml index 3747452..53361ca 100644 --- a/Widgets/Sidebar/Panel/WallpaperPanel.qml +++ b/Widgets/Sidebar/Panel/WallpaperPanel.qml @@ -30,7 +30,7 @@ PanelWindow { } onVisibleChanged: { - if (wallpaperPanelModal.visible) { + if (wallpaperPanelLoader.active) { wallpapers = WallpaperManager.wallpaperList } else { wallpapers = [] @@ -81,7 +81,7 @@ PanelWindow { id: closeButtonArea anchors.fill: parent hoverEnabled: true - onClicked: wallpaperPanelModal.visible = false + onClicked: wallpaperPanelLoader.active = false; cursorShape: Qt.PointingHandCursor } } @@ -136,13 +136,24 @@ PanelWindow { source: modelData fillMode: Image.PreserveAspectCrop asynchronous: true - cache: true + cache: false smooth: true mipmap: true // Limit memory usage sourceSize.width: 480 sourceSize.height: 270 } + Rectangle { + anchors.fill: parent + color: Theme.textPrimary + opacity: (wallpaperImage.status == Image.Ready) ? 0.0 : 1.0 + Behavior on opacity { + NumberAnimation { + duration: 500 + easing.type: Easing.OutCubic + } + } + } MouseArea { anchors.fill: parent hoverEnabled: true