even more deltarune
This commit is contained in:
@@ -36,7 +36,7 @@ Item {
|
||||
property int activeSelection: 0
|
||||
property bool inBluetoothMenu: false
|
||||
property bool inWallpaperMenu: false
|
||||
property bool inNotificationsMenu: false
|
||||
property bool inShellMenu: false
|
||||
property bool inPowerMenu: false
|
||||
property bool inPowerConfirm: false
|
||||
|
||||
@@ -84,7 +84,7 @@ Item {
|
||||
}
|
||||
|
||||
function currentAction() {
|
||||
if (root.inBluetoothMenu || root.inWallpaperMenu || root.inNotificationsMenu || root.inPowerMenu)
|
||||
if (root.inBluetoothMenu || root.inWallpaperMenu || root.inShellMenu || root.inPowerMenu)
|
||||
return null;
|
||||
return menuLength() > 0 ? menuAt(activeSelection) : null;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ Item {
|
||||
|
||||
property int bluetoothActionIndex: 1
|
||||
property int wallpaperActionIndex: 2
|
||||
property int notificationsActionIndex: 3
|
||||
property int shellActionIndex: 3
|
||||
property int powerActionIndex: 4
|
||||
property int pendingPowerActionIndex: 0
|
||||
property var pendingPowerCommand: []
|
||||
@@ -225,7 +225,7 @@ Item {
|
||||
ent: function () {
|
||||
root.inBluetoothMenu = true;
|
||||
root.inWallpaperMenu = false;
|
||||
root.inNotificationsMenu = false;
|
||||
root.inShellMenu = false;
|
||||
root.isSelected = false;
|
||||
root.activeSelection = 0;
|
||||
root.clampSelection();
|
||||
@@ -239,7 +239,7 @@ Item {
|
||||
ent: function () {
|
||||
root.inWallpaperMenu = true;
|
||||
root.inBluetoothMenu = false;
|
||||
root.inNotificationsMenu = false;
|
||||
root.inShellMenu = false;
|
||||
root.isSelected = false;
|
||||
var currentIndex = root.currentWallpaperIndex();
|
||||
root.activeSelection = currentIndex >= 0 ? currentIndex : 0;
|
||||
@@ -252,9 +252,9 @@ Item {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Notifications",
|
||||
name: "Shell",
|
||||
ent: function () {
|
||||
root.inNotificationsMenu = true;
|
||||
root.inShellMenu = true;
|
||||
root.inBluetoothMenu = false;
|
||||
root.inWallpaperMenu = false;
|
||||
root.inPowerMenu = false;
|
||||
@@ -274,7 +274,7 @@ Item {
|
||||
root.inPowerConfirm = false;
|
||||
root.inBluetoothMenu = false;
|
||||
root.inWallpaperMenu = false;
|
||||
root.inNotificationsMenu = false;
|
||||
root.inShellMenu = false;
|
||||
root.isSelected = false;
|
||||
root.activeSelection = 0;
|
||||
root.pendingPowerActionIndex = 0;
|
||||
@@ -315,7 +315,7 @@ Item {
|
||||
}
|
||||
]
|
||||
|
||||
property var notificationActions: [
|
||||
property var shellActions: [
|
||||
{
|
||||
name: "Stack Preview",
|
||||
ent: function () {
|
||||
@@ -327,10 +327,22 @@ Item {
|
||||
return "ON";
|
||||
return manager.notificationStackPreviewEnabled() ? "ON" : "OFF";
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Media Overlay",
|
||||
ent: function () {
|
||||
if (manager && manager.toggleMprisOverlayEnabled)
|
||||
manager.toggleMprisOverlayEnabled();
|
||||
},
|
||||
getState: function () {
|
||||
if (!manager || !manager.mprisOverlayEnabled)
|
||||
return "ON";
|
||||
return manager.mprisOverlayEnabled() ? "ON" : "OFF";
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
property var menuModel: root.inBluetoothMenu ? Bluetooth.devices : (root.inWallpaperMenu ? wallpaperFolderModel : (root.inNotificationsMenu ? notificationActions : (root.inPowerMenu ? (root.inPowerConfirm ? powerConfirmActions : powerActions) : actions)))
|
||||
property var menuModel: root.inBluetoothMenu ? Bluetooth.devices : (root.inWallpaperMenu ? wallpaperFolderModel : (root.inShellMenu ? shellActions : (root.inPowerMenu ? (root.inPowerConfirm ? powerConfirmActions : powerActions) : actions)))
|
||||
|
||||
FolderListModel {
|
||||
id: wallpaperFolderModel
|
||||
@@ -427,7 +439,7 @@ Item {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: root.inPowerConfirm ? "CONFIRM" : (root.inPowerMenu ? "POWER" : (root.inBluetoothMenu ? "BLUETOOTH" : (root.inWallpaperMenu ? "WALLPAPER" : (root.inNotificationsMenu ? "NOTIFICATIONS" : "CONFIG"))))
|
||||
text: root.inPowerConfirm ? "CONFIRM" : (root.inPowerMenu ? "POWER" : (root.inBluetoothMenu ? "BLUETOOTH" : (root.inWallpaperMenu ? "WALLPAPER" : (root.inShellMenu ? "SHELL" : "CONFIG"))))
|
||||
font.family: "8bitoperator JVE"
|
||||
font.pixelSize: 71
|
||||
renderType: Text.NativeRendering
|
||||
@@ -561,10 +573,10 @@ Item {
|
||||
const wallpaperPath = wallpaperPathAt(activeSelection);
|
||||
if (wallpaperPath && wallpaperPath.length > 0)
|
||||
root.applyWallpaper(wallpaperPath);
|
||||
} else if (root.inNotificationsMenu) {
|
||||
const notificationAction = menuAt(activeSelection);
|
||||
if (notificationAction && notificationAction.ent)
|
||||
notificationAction.ent();
|
||||
} else if (root.inShellMenu) {
|
||||
const shellAction = menuAt(activeSelection);
|
||||
if (shellAction && shellAction.ent)
|
||||
shellAction.ent();
|
||||
} else if (root.inPowerConfirm) {
|
||||
const confirmAction = menuAt(activeSelection);
|
||||
if (confirmAction && confirmAction.name === "Yes") {
|
||||
@@ -615,10 +627,10 @@ Item {
|
||||
root.pendingPowerCommand = [];
|
||||
root.activeSelection = root.powerActionIndex;
|
||||
root.clampSelection();
|
||||
} else if (root.inNotificationsMenu) {
|
||||
root.inNotificationsMenu = false;
|
||||
} else if (root.inShellMenu) {
|
||||
root.inShellMenu = false;
|
||||
root.isSelected = false;
|
||||
root.activeSelection = root.notificationsActionIndex;
|
||||
root.activeSelection = root.shellActionIndex;
|
||||
root.clampSelection();
|
||||
} else if (root.inBluetoothMenu) {
|
||||
root.inBluetoothMenu = false;
|
||||
@@ -642,7 +654,7 @@ Item {
|
||||
root.isSelected = false;
|
||||
root.inBluetoothMenu = false;
|
||||
root.inWallpaperMenu = false;
|
||||
root.inNotificationsMenu = false;
|
||||
root.inShellMenu = false;
|
||||
root.inPowerMenu = false;
|
||||
root.inPowerConfirm = false;
|
||||
root.pendingPowerActionIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user