Wallpaper: minor optimizations/simplification
This commit is contained in:
parent
66a4618d09
commit
b43b065cf2
3 changed files with 3 additions and 17 deletions
|
|
@ -23,9 +23,9 @@ Singleton {
|
|||
property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (configDir + "settings.json")
|
||||
|
||||
property string defaultAvatar: Quickshell.env("HOME") + "/.face"
|
||||
property string defaultWallpapersDirectory: Quickshell.env("HOME") + "/Pictures/Wallpapers"
|
||||
property string defaultVideosDirectory: Quickshell.env("HOME") + "/Videos"
|
||||
property string defaultLocation: "Tokyo"
|
||||
property string defaultWallpapersDirectory: Quickshell.env("HOME") + "/Pictures/Wallpapers"
|
||||
property string defaultWallpaper: Quickshell.shellDir + "/Assets/Wallpaper/noctalia.png"
|
||||
|
||||
// Used to access via Settings.data.xxx.yyy
|
||||
|
|
@ -335,7 +335,6 @@ Singleton {
|
|||
property int transitionDuration: 1500 // 1500 ms
|
||||
property string transitionType: "random"
|
||||
property real transitionEdgeSmoothness: 0.05
|
||||
property string defaultWallpaper: root.defaultWallpaper
|
||||
property list<var> monitors: []
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ Variants {
|
|||
// Internal state management
|
||||
property string transitionType: "fade"
|
||||
property real transitionProgress: 0
|
||||
// Scaling support for widgets that rely on it
|
||||
property real scaling: ScalingService.getScreenScale(screen)
|
||||
|
||||
readonly property real edgeSmoothness: Settings.data.wallpaper.transitionEdgeSmoothness
|
||||
readonly property var allTransitions: WallpaperService.allTransitions
|
||||
|
|
@ -91,14 +89,7 @@ Variants {
|
|||
left: true
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ScalingService
|
||||
function onScaleChanged(screenName, scale) {
|
||||
if ((screen !== null) && (screenName === screen.name)) {
|
||||
scaling = scale
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Timer {
|
||||
id: debounceTimer
|
||||
|
|
|
|||
|
|
@ -216,11 +216,7 @@ Singleton {
|
|||
// -------------------------------------------------------------------
|
||||
// Get specific monitor wallpaper - now from cache
|
||||
function getWallpaper(screenName) {
|
||||
var path = currentWallpapers[screenName] || ""
|
||||
if (path === "") {
|
||||
return Settings.data.wallpaper.defaultWallpaper || ""
|
||||
}
|
||||
return path
|
||||
return currentWallpapers[screenName] || Settings.defaultWallpaper
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue