mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-03 19:01:50 +00:00
WallpaperSelector: set current tab index to the current screen the UI opened on.
This commit is contained in:
@@ -23,7 +23,16 @@ NPanel {
|
||||
panelContent: Rectangle {
|
||||
id: wallpaperPanel
|
||||
|
||||
property int currentScreenIndex: 0
|
||||
property int currentScreenIndex: {
|
||||
if (screen !== null) {
|
||||
for (var i = 0; i < Quickshell.screens.length; i++) {
|
||||
if (Quickshell.screens[i].name == screen.name) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
property var currentScreen: Quickshell.screens[currentScreenIndex]
|
||||
property string filterText: ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user