Skip to content
Snippets Groups Projects
Commit fe9388b9 authored by Prince Gupta's avatar Prince Gupta :speech_balloon: Committed by François Cartegnie
Browse files

qml: make player playlistview resizable

parent b92dbdc4
No related branches found
No related tags found
1 merge request!3001qml: make player playlistview resizable
Pipeline #296935 passed with stage
in 19 minutes
......@@ -532,14 +532,15 @@ FocusScope {
edge: Widgets.DrawerExt.Edges.Right
state: playlistVisibility.isPlaylistVisible ? "visible" : "hidden"
component: Rectangle {
// NOTE: Take the minimumWidth into account.
width: Math.max(playlistView.minimumWidth,
(rootPlayer.width + playlistView.rightPadding) / 4)
width: Helpers.clamp(rootPlayer.width / resizeHandle.widthFactor
, playlistView.minimumWidth
, (rootPlayer.width + playlistView.rightPadding) / 2)
height: playlistpopup.height
color: rootPlayer.colors.setColorAlpha(rootPlayer.colors.topBanner, 0.8)
PL.PlaylistListView {
id: playlistView
......@@ -571,6 +572,21 @@ FocusScope {
else
controlBarView.forceActiveFocus()
}
// TODO: remember width factor?
Widgets.HorizontalResizeHandle {
id: resizeHandle
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
}
atRight: false
targetWidth: playlistpopup.width
sourceWidth: rootPlayer.width
}
}
}
onStateChanged: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment