1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 07:52:50 -05:00

Tweak loaders of file browser and centcom

This commit is contained in:
bbedward
2025-08-16 11:53:54 -04:00
parent 115e9e0f81
commit d920c535f1
2 changed files with 21 additions and 46 deletions

View File

@@ -14,7 +14,6 @@ PanelWindow {
readonly property bool hasActiveMedia: MprisController.activePlayer !== null readonly property bool hasActiveMedia: MprisController.activePlayer !== null
property bool calendarVisible: false property bool calendarVisible: false
property bool internalVisible: false
property real triggerX: (Screen.width - 480) / 2 property real triggerX: (Screen.width - 480) / 2
property real triggerY: Theme.barHeight + 4 property real triggerY: Theme.barHeight + 4
property real triggerWidth: 80 property real triggerWidth: 80
@@ -29,17 +28,13 @@ PanelWindow {
triggerScreen = screen triggerScreen = screen
} }
visible: internalVisible visible: calendarVisible
screen: triggerScreen screen: triggerScreen
onCalendarVisibleChanged: { onCalendarVisibleChanged: {
if (calendarVisible) { if (calendarVisible) {
internalVisible = true
Qt.callLater(() => { Qt.callLater(() => {
internalVisible = true
calendarGrid.loadEventsForMonth() calendarGrid.loadEventsForMonth()
}) })
} else {
internalVisible = false
} }
} }
onVisibleChanged: { onVisibleChanged: {

View File

@@ -10,8 +10,8 @@ import qs.Widgets
Item { Item {
id: personalizationTab id: personalizationTab
property alias profileBrowser: profileBrowserLoader.item property alias profileBrowser: profileBrowser
property alias wallpaperBrowser: wallpaperBrowserLoader.item property alias wallpaperBrowser: wallpaperBrowser
Component.onCompleted: { Component.onCompleted: {
// Access WallpaperCyclingService to ensure it's initialized // Access WallpaperCyclingService to ensure it's initialized
@@ -238,7 +238,6 @@ Item {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
profileBrowserLoader.active = true;
profileBrowser.visible = true; profileBrowser.visible = true;
} }
} }
@@ -438,7 +437,6 @@ Item {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
wallpaperBrowserLoader.active = true;
wallpaperBrowser.visible = true; wallpaperBrowser.visible = true;
} }
} }
@@ -908,48 +906,30 @@ Item {
} }
LazyLoader { FileBrowserModal {
id: profileBrowserLoader id: profileBrowser
active: false browserTitle: "Select Profile Image"
browserIcon: "person"
FileBrowserModal { browserType: "profile"
id: profileBrowser fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
onFileSelected: (path) => {
browserTitle: "Select Profile Image" PortalService.setProfileImage(path);
browserIcon: "person" visible = false;
browserType: "profile"
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
onFileSelected: (path) => {
PortalService.setProfileImage(path);
visible = false;
}
onDialogClosed: {
}
} }
} }
LazyLoader { FileBrowserModal {
id: wallpaperBrowserLoader id: wallpaperBrowser
active: false browserTitle: "Select Wallpaper"
browserIcon: "wallpaper"
FileBrowserModal { browserType: "wallpaper"
id: wallpaperBrowser fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
onFileSelected: (path) => {
browserTitle: "Select Wallpaper" SessionData.setWallpaper(path);
browserIcon: "wallpaper" visible = false;
browserType: "wallpaper"
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
onFileSelected: (path) => {
SessionData.setWallpaper(path);
visible = false;
}
onDialogClosed: {
}
} }
} }
} }