mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 09:18:07 +00:00
homescreens/halcyon: Fix list highlight within folder
This commit is contained in:
parent
c6ec8606c5
commit
2603f461e6
1 changed files with 39 additions and 38 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick as QQ
|
import QtQuick
|
||||||
|
|
||||||
import org.kde.plasma.extras as PlasmaExtras
|
import org.kde.plasma.extras as PlasmaExtras
|
||||||
|
|
||||||
QQ.GridView {
|
GridView {
|
||||||
id: root
|
id: root
|
||||||
|
currentIndex: -1
|
||||||
|
|
||||||
maximumFlickVelocity: 5000
|
maximumFlickVelocity: 5000
|
||||||
|
|
||||||
|
|
@ -20,12 +21,12 @@ QQ.GridView {
|
||||||
property var leftEdgeCallback: null
|
property var leftEdgeCallback: null
|
||||||
property var rightEdgeCallback: null
|
property var rightEdgeCallback: null
|
||||||
|
|
||||||
QQ.Keys.onPressed: event => {
|
Keys.onPressed: event => {
|
||||||
if (!currentItem) {
|
if (!currentItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(event.key){
|
switch(event.key) {
|
||||||
case Qt.Key_Left: {
|
case Qt.Key_Left: {
|
||||||
if (currentItem.x === 0
|
if (currentItem.x === 0
|
||||||
&& leftEdgeCallback) {
|
&& leftEdgeCallback) {
|
||||||
|
|
@ -69,7 +70,7 @@ QQ.GridView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QQ.Component {
|
Component {
|
||||||
id: highlightComponent
|
id: highlightComponent
|
||||||
|
|
||||||
PlasmaExtras.Highlight {}
|
PlasmaExtras.Highlight {}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue