mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-30 08:14:45 +00:00
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:
parent
976c770af4
commit
2a171f3964
2 changed files with 23 additions and 21 deletions
|
|
@ -77,7 +77,7 @@ Window {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case GamingShell.GamepadManager.ButtonDPadDown:
|
case GamingShell.GamepadManager.ButtonDPadDown:
|
||||||
if (taskList.activeFocus || runningGames.activeFocus) {
|
if (runningGames.activeFocus) {
|
||||||
grid.forceActiveFocus()
|
grid.forceActiveFocus()
|
||||||
} else if (grid.activeFocus) {
|
} else if (grid.activeFocus) {
|
||||||
grid.moveCurrentIndexDown()
|
grid.moveCurrentIndexDown()
|
||||||
|
|
@ -93,8 +93,6 @@ Window {
|
||||||
if (grid.activeFocus && grid.currentItem) {
|
if (grid.activeFocus && grid.currentItem) {
|
||||||
GamingShell.GameLauncherProvider.launch(grid.currentIndex)
|
GamingShell.GameLauncherProvider.launch(grid.currentIndex)
|
||||||
root.gameStarted()
|
root.gameStarted()
|
||||||
} else if (taskList.activeFocus && taskList.currentItem) {
|
|
||||||
taskList.currentItem.activate()
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case GamingShell.GamepadManager.ButtonB:
|
case GamingShell.GamepadManager.ButtonB:
|
||||||
|
|
@ -338,7 +336,6 @@ Window {
|
||||||
? Kirigami.Theme.highlightColor
|
? Kirigami.Theme.highlightColor
|
||||||
: (parent.hovered ? Kirigami.Theme.hoverColor : "transparent")
|
: (parent.hovered ? Kirigami.Theme.hoverColor : "transparent")
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
|
|
@ -348,26 +345,19 @@ Window {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
visible: hasArt
|
visible: hasArt
|
||||||
|
|
||||||
Image {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
source: hasArt ? "file://" + artwork : ""
|
radius: Kirigami.Units.cornerRadius
|
||||||
fillMode: Image.PreserveAspectCrop
|
clip: true
|
||||||
smooth: true
|
color: "transparent"
|
||||||
asynchronous: true
|
|
||||||
|
|
||||||
// Rounded top corners via layer
|
Image {
|
||||||
layer.enabled: true
|
anchors.fill: parent
|
||||||
layer.effect: Item {
|
source: hasArt ? "file://" + artwork : ""
|
||||||
Rectangle {
|
fillMode: Image.PreserveAspectCrop
|
||||||
anchors.fill: parent
|
smooth: true
|
||||||
radius: Kirigami.Units.cornerRadius
|
asynchronous: true
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scale: parent.parent.parent.isCurrent ? 1.03 : 1.0
|
|
||||||
Behavior on scale {
|
|
||||||
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,18 @@ ContainmentItem {
|
||||||
screenGeometry: Plasmoid.containment.screenGeometry
|
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
|
// Close app drawer when a new window appears
|
||||||
Connections {
|
Connections {
|
||||||
target: WindowPlugin.WindowUtil
|
target: WindowPlugin.WindowUtil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue