1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

greeter: fix cornerRadius and fillmode sync

fixes #609
This commit is contained in:
bbedward
2025-11-03 13:26:21 -05:00
parent a8f6880840
commit a0ee4792b9
4 changed files with 12 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ import Quickshell.Io
import Quickshell.Services.UPower import Quickshell.Services.UPower
import qs.Common import qs.Common
import qs.Services import qs.Services
import qs.Modules.Greetd
import "StockThemes.js" as StockThemes import "StockThemes.js" as StockThemes
Singleton { Singleton {
@@ -425,7 +426,12 @@ Singleton {
} }
} }
property real cornerRadius: typeof SettingsData !== "undefined" ? SettingsData.cornerRadius : 12 property real cornerRadius: {
if (typeof SessionData !== "undefined" && SessionData.isGreeterMode && typeof GreetdSettings !== "undefined") {
return GreetdSettings.cornerRadius
}
return typeof SettingsData !== "undefined" ? SettingsData.cornerRadius : 12
}
property real spacingXS: 4 property real spacingXS: 4
property real spacingS: 8 property real spacingS: 8
property real spacingM: 12 property real spacingM: 12

View File

@@ -160,7 +160,7 @@ Variants {
asynchronous: true asynchronous: true
smooth: true smooth: true
cache: true cache: true
fillMode: root.getFillMode(SettingsData.wallpaperFillMode) fillMode: root.getFillMode(SessionData.isGreeterMode ? GreetdSettings.wallpaperFillMode : SettingsData.wallpaperFillMode)
} }
Image { Image {
@@ -171,7 +171,7 @@ Variants {
asynchronous: true asynchronous: true
smooth: true smooth: true
cache: true cache: true
fillMode: root.getFillMode(SettingsData.wallpaperFillMode) fillMode: root.getFillMode(SessionData.isGreeterMode ? GreetdSettings.wallpaperFillMode : SettingsData.wallpaperFillMode)
onStatusChanged: { onStatusChanged: {
if (status !== Image.Ready) if (status !== Image.Ready)

View File

@@ -43,6 +43,7 @@ Singleton {
property bool lockScreenShowPowerActions: true property bool lockScreenShowPowerActions: true
property var screenPreferences: ({}) property var screenPreferences: ({})
property int animationSpeed: 2 property int animationSpeed: 2
property string wallpaperFillMode: "Fill"
readonly property string defaultFontFamily: "Inter Variable" readonly property string defaultFontFamily: "Inter Variable"
readonly property string defaultMonoFontFamily: "Fira Code" readonly property string defaultMonoFontFamily: "Fira Code"
@@ -78,6 +79,7 @@ Singleton {
lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true
screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({}) screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({})
animationSpeed = settings.animationSpeed !== undefined ? settings.animationSpeed : 2 animationSpeed = settings.animationSpeed !== undefined ? settings.animationSpeed : 2
wallpaperFillMode = settings.wallpaperFillMode !== undefined ? settings.wallpaperFillMode : "Fill"
settingsLoaded = true settingsLoaded = true
if (typeof Theme !== "undefined") { if (typeof Theme !== "undefined") {

View File

@@ -149,7 +149,7 @@ Item {
var currentWallpaper = SessionData.getMonitorWallpaper(screenName) var currentWallpaper = SessionData.getMonitorWallpaper(screenName)
return (currentWallpaper && !currentWallpaper.startsWith("#")) ? currentWallpaper : "" return (currentWallpaper && !currentWallpaper.startsWith("#")) ? currentWallpaper : ""
} }
fillMode: Theme.getFillMode(SettingsData.wallpaperFillMode) fillMode: Theme.getFillMode(GreetdSettings.wallpaperFillMode)
smooth: true smooth: true
asynchronous: false asynchronous: false
cache: true cache: true