Commit 0d8c7b85 authored by Nate Graham's avatar Nate Graham
Browse files

Play song in playlist when tapped with a touchscreen

Double-click isn't a thing on touch; people expect things to react on a
single tap. Let's honor that assumption by making playlist items play
when tapped once with a tochscreen. To make the extra actions for
unselected songs more accessible, now playlist items' overflow menu
buttons are always visible.

BUG: 454343
CCBUG: 434437
FIXED-IN: 22.08
parent 285fbb57
......@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
import QtQuick.Window 2.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
import org.kde.kirigami 2.17 as Kirigami
import org.kde.elisa 1.0
import "shared"
......@@ -368,7 +368,7 @@ BasePlayListDelegate {
Loader {
id: menuButtonLoader
active: !playListEntry.wideMode
active: !playListEntry.wideMode || Kirigami.Settings.hasTransientTouchInput
visible: active
sourceComponent: FlatButtonWithToolTip {
icon.name: "overflow-menu"
......@@ -382,7 +382,7 @@ BasePlayListDelegate {
Loader {
id: menuLoader
property bool menuVisible: false
active: !playListEntry.wideMode
active: menuButtonLoader.active
onActiveChanged: {
if (!active) {
menuVisible = false
......
......@@ -7,7 +7,7 @@
import QtQuick 2.7
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.2 as Kirigami
import org.kde.kirigami 2.17 as Kirigami
import org.kde.elisa 1.0
Kirigami.AbstractListItem {
......@@ -52,7 +52,7 @@ Kirigami.AbstractListItem {
listView.currentIndex = index
forceActiveFocus()
if (model.isValid && (simpleMode || Kirigami.Settings.isMobile)) {
if (model.isValid && (simpleMode || Kirigami.Settings.isMobile || Kirigami.Settings.hasTransientTouchInput)) {
switchToTrack(index)
startPlayback()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment