Fix overlay rendering, hover blink, and dead-end state

The cover art tile used layer.effect with a plain Item instead
of a ShaderEffect, which broke the overlay rendering. Replace
with a clipped Rectangle wrapper.

Remove Behavior on color from the grid delegate background —
GridView currentIndex changes on hover caused the highlight
color to flash visibly between cells.

Fix dangling taskList reference in the gamepad ButtonA and
DPadDown handlers (taskList lives inside RunningGamesView).

Auto-reopen Game Center when the last window closes in gaming
mode so the user is never stranded on a bare wallpaper.
This commit is contained in:
Marco Allegretti 2026-04-20 10:32:30 +02:00
parent 976c770af4
commit 2a171f3964
2 changed files with 23 additions and 21 deletions

View file

@ -77,7 +77,7 @@ Window {
}
break
case GamingShell.GamepadManager.ButtonDPadDown:
if (taskList.activeFocus || runningGames.activeFocus) {
if (runningGames.activeFocus) {
grid.forceActiveFocus()
} else if (grid.activeFocus) {
grid.moveCurrentIndexDown()
@ -93,8 +93,6 @@ Window {
if (grid.activeFocus && grid.currentItem) {
GamingShell.GameLauncherProvider.launch(grid.currentIndex)
root.gameStarted()
} else if (taskList.activeFocus && taskList.currentItem) {
taskList.currentItem.activate()
}
break
case GamingShell.GamepadManager.ButtonB:
@ -338,7 +336,6 @@ Window {
? Kirigami.Theme.highlightColor
: (parent.hovered ? Kirigami.Theme.hoverColor : "transparent")
radius: Kirigami.Units.cornerRadius
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
}
contentItem: Item {
@ -348,26 +345,19 @@ Window {
spacing: 0
visible: hasArt
Image {
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
source: hasArt ? "file://" + artwork : ""
fillMode: Image.PreserveAspectCrop
smooth: true
asynchronous: true
radius: Kirigami.Units.cornerRadius
clip: true
color: "transparent"
// Rounded top corners via layer
layer.enabled: true
layer.effect: Item {
Rectangle {
anchors.fill: parent
radius: Kirigami.Units.cornerRadius
}
}
scale: parent.parent.parent.isCurrent ? 1.03 : 1.0
Behavior on scale {
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
Image {
anchors.fill: parent
source: hasArt ? "file://" + artwork : ""
fillMode: Image.PreserveAspectCrop
smooth: true
asynchronous: true
}
}

View file

@ -107,6 +107,18 @@ ContainmentItem {
screenGeometry: Plasmoid.containment.screenGeometry
}
// In gaming mode, reopen Game Center when the last window goes away
// so the user is never stranded on a bare wallpaper.
Connections {
target: windowMaximizedTracker
enabled: ShellSettings.Settings.gamingModeEnabled
function onShowingWindowChanged() {
if (!windowMaximizedTracker.showingWindow && !root.gameCenterOpen) {
root.gameCenterOpen = true
}
}
}
// Close app drawer when a new window appears
Connections {
target: WindowPlugin.WindowUtil