diff --git a/containments/homescreens/folio/qml/gaming/GameCenterOverlay.qml b/containments/homescreens/folio/qml/gaming/GameCenterOverlay.qml index 478466a0..ebe6a6c4 100644 --- a/containments/homescreens/folio/qml/gaming/GameCenterOverlay.qml +++ b/containments/homescreens/folio/qml/gaming/GameCenterOverlay.qml @@ -172,11 +172,20 @@ Window { anchors.fill: parent sourceComponent: Kirigami.PromptDialog { - title: i18n("Exit Gaming Mode") - subtitle: i18n("Keep gaming mode enabled, or switch back to the normal shell layout?") - standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel - - onAccepted: ShellSettings.Settings.gamingModeEnabled = false + id: theExitDialog + title: i18n("Leave gaming mode?") + subtitle: i18n("Your games will keep running in the background.") + standardButtons: Kirigami.Dialog.NoButton + customFooterActions: [ + Kirigami.Action { + text: i18n("Keep Playing") + onTriggered: theExitDialog.close() + }, + Kirigami.Action { + text: i18n("Leave") + onTriggered: ShellSettings.Settings.gamingModeEnabled = false + } + ] onClosed: exitGamingDialog.active = false } } diff --git a/containments/homescreens/folio/qml/main.qml b/containments/homescreens/folio/qml/main.qml index 088e6792..e645c4d9 100644 --- a/containments/homescreens/folio/qml/main.qml +++ b/containments/homescreens/folio/qml/main.qml @@ -698,9 +698,14 @@ ContainmentItem { // Small persistent button at the top-right corner of the screen that lets // the user return to the Game Center after launching a game. - GamingHUD { - visible: ShellSettings.Settings.gamingModeEnabled && !root.gameCenterOpen - onOpenRequested: root.gameCenterOpen = true + // Wrapped in a Loader so the LayerShell Window is destroyed (not merely + // hidden) when not needed — hiding a LayerShell window with AnchorTop|Right + // but no fixed height causes a Wayland protocol error (height=0). + Loader { + active: ShellSettings.Settings.gamingModeEnabled && !root.gameCenterOpen + sourceComponent: GamingHUD { + onOpenRequested: root.gameCenterOpen = true + } } Rectangle { diff --git a/quicksettings/gaming/contents/ui/main.qml b/quicksettings/gaming/contents/ui/main.qml index a390c193..6d022f1c 100644 --- a/quicksettings/gaming/contents/ui/main.qml +++ b/quicksettings/gaming/contents/ui/main.qml @@ -35,11 +35,20 @@ QS.QuickSetting { active: false sourceComponent: Kirigami.PromptDialog { - title: i18n("Exit Gaming Mode") - subtitle: i18n("Switch back to the normal shell layout?") - standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel - - onAccepted: ShellSettings.Settings.gamingModeEnabled = false + id: theConfirmDialog + title: i18n("Leave gaming mode?") + subtitle: i18n("Your games will keep running in the background.") + standardButtons: Kirigami.Dialog.NoButton + customFooterActions: [ + Kirigami.Action { + text: i18n("Keep Playing") + onTriggered: theConfirmDialog.close() + }, + Kirigami.Action { + text: i18n("Leave") + onTriggered: ShellSettings.Settings.gamingModeEnabled = false + } + ] onClosed: confirmDisableDialog.active = false } } diff --git a/quicksettings/gaminghint/contents/ui/main.qml b/quicksettings/gaminghint/contents/ui/main.qml index f6623072..fbf548b1 100644 --- a/quicksettings/gaminghint/contents/ui/main.qml +++ b/quicksettings/gaminghint/contents/ui/main.qml @@ -7,10 +7,11 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS QS.QuickSetting { - text: i18n("Game Center Hint") + text: i18n("Launch Hint") icon: "dialog-information" status: "" enabled: ShellSettings.Settings.gamingDismissHintEnabled + available: ShellSettings.Settings.gamingModeEnabled function toggle() { ShellSettings.Settings.gamingDismissHintEnabled = !ShellSettings.Settings.gamingDismissHintEnabled;