mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
background-overview: improved init to avoid noctalia bg showing
This commit is contained in:
@@ -97,6 +97,10 @@ Variants {
|
||||
Connections {
|
||||
target: CompositorService
|
||||
function onDisplayScalesChanged() {
|
||||
if (!WallpaperService.isInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentPath = WallpaperService.getWallpaper(modelData.name);
|
||||
if (!currentPath || WallpaperService.isSolidColorPath(currentPath)) {
|
||||
return;
|
||||
@@ -646,6 +650,9 @@ Variants {
|
||||
_solidColor2 = colorStr;
|
||||
// No image to load, start transition immediately
|
||||
nextWallpaper.source = "";
|
||||
if (!wallpaperReady) {
|
||||
wallpaperReady = true;
|
||||
}
|
||||
currentWallpaper.asynchronous = false;
|
||||
transitionAnimation.start();
|
||||
} else {
|
||||
|
||||
@@ -19,10 +19,12 @@ Loader {
|
||||
required property ShellScreen modelData
|
||||
property string wallpaper: ""
|
||||
property string preprocessedWallpaper: "" // Pre-resized wallpaper from Background.qml
|
||||
property bool isSolidColor: false
|
||||
property bool isSolidColor: Settings.data.wallpaper.useSolidColor
|
||||
property color solidColor: Settings.data.wallpaper.solidColor
|
||||
property color tintColor: Settings.data.colorSchemes.darkMode ? Color.mSurface : Color.mOnSurface
|
||||
|
||||
visible: wallpaper !== "" || isSolidColor
|
||||
|
||||
Component.onCompleted: {
|
||||
if (modelData) {
|
||||
Logger.d("Overview", "Loading overview for Niri on", modelData.name);
|
||||
@@ -83,6 +85,7 @@ Loader {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: tintColor
|
||||
opacity: Settings.data.wallpaper.overviewTint
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user