Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Elisa
Commits
2552e7bb
Commit
2552e7bb
authored
Feb 21, 2022
by
Nate Graham
Browse files
Only show drag handles when the playlist contains more then one song
If there's only one song, you couldn't drag it anywhere anyway.
parent
b4d6864a
Pipeline
#140678
passed with stage
in 3 minutes and 37 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/qml/MediaPlayListView.qml
View file @
2552e7bb
...
...
@@ -163,6 +163,7 @@ Kirigami.Page {
isPlaying
:
model
.
isPlaying
metadataModifiableRole
:
model
&&
model
.
metadataModifiableRole
?
model
.
metadataModifiableRole
:
false
listView
:
playListView
showDragHandle
:
playListView
.
count
>
1
}
}
...
...
@@ -279,6 +280,7 @@ Kirigami.Page {
isPlaying
:
model
?
model
.
isPlaying
:
false
metadataModifiableRole
:
model
&&
model
.
metadataModifiableRole
?
model
.
metadataModifiableRole
:
false
hideDiscNumber
:
model
&&
model
.
isSingleDiscAlbum
showDragHandle
:
playListView
.
count
>
1
listView
:
playListView
...
...
src/qml/PlayListEntry.qml
View file @
2552e7bb
...
...
@@ -61,7 +61,7 @@ BasePlayListDelegate {
spacing
:
Kirigami
.
Units
.
smallSpacing
/
2
Loader
{
active
:
!
simpleMode
active
:
!
simpleMode
&&
playListEntry
.
showDragHandle
sourceComponent
:
Kirigami.ListItemDragHandle
{
listItem
:
playListEntry
listView
:
playListEntry
.
listView
...
...
src/qml/mobile/MobilePlayListDelegate.qml
View file @
2552e7bb
...
...
@@ -73,6 +73,7 @@ BasePlayListDelegate {
// drag handle (for list reordering)
Kirigami.ListItemDragHandle
{
visible
:
playListEntry
.
showDragHandle
listItem
:
playListEntry
listView
:
playListEntry
.
listView
onMoveRequested
:
ElisaApplication
.
mediaPlayListProxyModel
.
moveRow
(
oldIndex
,
newIndex
)
...
...
src/qml/shared/BasePlayListDelegate.qml
View file @
2552e7bb
...
...
@@ -36,6 +36,7 @@ Kirigami.AbstractListItem {
property
var
listView
property
bool
simpleMode
:
false
property
bool
showDragHandle
:
true
signal
startPlayback
()
signal
pausePlayback
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment