Fix Matugen, NPanel overlay and probably SWWW

This commit is contained in:
quadbyte 2025-08-15 06:49:24 -04:00
parent dd471581cd
commit 867444a29c
4 changed files with 22 additions and 7 deletions

View file

@ -97,8 +97,14 @@ Singleton {
id: customColorsFile id: customColorsFile
path: Settings.configDir + "colors.json" path: Settings.configDir + "colors.json"
watchChanges: true watchChanges: true
onFileChanged: reload() onFileChanged: {
onAdapterUpdated: writeAdapter() console.log("[Colors] reloading colors file from disk")
reload()
}
onAdapterUpdated: {
console.log("[Colors] writing colors to disk, primary color:", mPrimary)
writeAdapter()
}
onLoadFailed: function (error) { onLoadFailed: function (error) {
if (error.toString().includes("No such file") || error === 2) { if (error.toString().includes("No such file") || error === 2) {
// File doesn't exist, create it with default values // File doesn't exist, create it with default values

View file

@ -48,7 +48,7 @@ Singleton {
console.log("[Settings] Loaded") console.log("[Settings] Loaded")
Qt.callLater(function () { Qt.callLater(function () {
if (adapter.wallpaper.current !== "") { if (adapter.wallpaper.current !== "") {
console.log("[Settings] Set current wallpaper") console.log("[Settings] Set current wallpaper", adapter.wallpaper.current)
Wallpapers.setCurrentWallpaper(adapter.wallpaper.current, true) Wallpapers.setCurrentWallpaper(adapter.wallpaper.current, true)
} }
}) })

View file

@ -19,6 +19,8 @@ Singleton {
property var wallpaperList: [] property var wallpaperList: []
property string currentWallpaper: Settings.data.wallpaper.current property string currentWallpaper: Settings.data.wallpaper.current
property bool scanning: false property bool scanning: false
// SWWW
property string transitionType: Settings.data.wallpaper.swww.transitionType property string transitionType: Settings.data.wallpaper.swww.transitionType
property var randomChoices: ["simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer"] property var randomChoices: ["simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer"]
@ -120,7 +122,8 @@ Singleton {
if (status === FolderListModel.Ready) { if (status === FolderListModel.Ready) {
var files = [] var files = []
for (var i = 0; i < count; i++) { for (var i = 0; i < count; i++) {
var filepath = folderModel.folder + "/" + get(i, "fileName") var directory = (Settings.data.wallpaper.directory !== undefined ? Settings.data.wallpaper.directory : "")
var filepath = directory + "/" + get(i, "fileName")
files.push(filepath) files.push(filepath)
} }
wallpaperList = files wallpaperList = files
@ -157,8 +160,14 @@ Singleton {
running: false running: false
stdout: StdioCollector { stdout: StdioCollector {
onStreamFinished: { onStreamFinished: {
console.log("[Wallpapers] generated colors from image")
//console.log(this.text) }
}
stderr: StdioCollector {
onStreamFinished: {
if (this.text !== "") {
console.error(this.text)
}
} }
} }
} }

View file

@ -9,7 +9,7 @@ PanelWindow {
readonly property real scaling: Scaling.scale(screen) readonly property real scaling: Scaling.scale(screen)
property bool showOverlay: Settings.data.general.dimDesktop property bool showOverlay: Settings.data.general.dimDesktop
property int topMargin: Style.barHeight * scaling property int topMargin: Style.barHeight * scaling
property color overlayColor: showOverlay ? Colors.overlay : "transparent" property color overlayColor: showOverlay ? Colors.applyOpacity(Colors.mShadow, "AA") : "transparent"
signal dismissed signal dismissed