mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Conditional Overview.qml loading
This commit is contained in:
@@ -3,11 +3,23 @@ import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
NLoader {
|
||||
active: Workspaces.isNiri
|
||||
|
||||
Component.onCompleted: {
|
||||
if (Workspaces.isNiri) {
|
||||
console.log("[Overview] Loading Overview component (Niri detected)")
|
||||
} else {
|
||||
console.log("[Overview] Skipping Overview component (Niri not detected)")
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
delegate: PanelWindow {
|
||||
delegate: PanelWindow {
|
||||
required property ShellScreen modelData
|
||||
property string wallpaperSource: Wallpapers.currentWallpaper !== ""
|
||||
&& !Settings.data.wallpaper.swww.enabled ? Wallpapers.currentWallpaper : ""
|
||||
@@ -53,4 +65,5 @@ Variants {
|
||||
color: Qt.rgba(Colors.backgroundPrimary.r, Colors.backgroundPrimary.g, Colors.backgroundPrimary.b, 0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user