[vlc-commits] [Git][videolan/vlc][master] qml: make player playlistview resizable
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Mon Dec 26 09:47:48 UTC 2022
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
fe9388b9 by Prince Gupta at 2022-12-26T09:32:36+00:00
qml: make player playlistview resizable
- - - - -
1 changed file:
- modules/gui/qt/player/qml/Player.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -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: {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fe9388b9b544d24495848ea0d5870631d7db0b4c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fe9388b9b544d24495848ea0d5870631d7db0b4c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list