[vlc-commits] qml: use playlist scale factor setting for playlist in maindisplay
Fatih Uzunoglu
git at videolan.org
Mon Aug 10 12:10:12 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Thu Jul 30 00:04:37 2020 +0300| [fdd19251d914aa993c7a2ad88cb89bd002030a56] | committer: Pierre Lamot
qml: use playlist scale factor setting for playlist in maindisplay
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fdd19251d914aa993c7a2ad88cb89bd002030a56
---
modules/gui/qt/medialibrary/qml/MainDisplay.qml | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 812014122d..cfd6f12189 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -47,12 +47,12 @@ Widgets.NavigableFocusScope {
}
/// playlist width properties used for binding after resize:
- // This binding allows playlist to scale when root width changes *even after playlist is resized*
- // New supposed width of the playlist = root.width / 4
- // Playlist width difference after playlist resize event: (playlistColumn.__newWidth - playlistColumn.__oldRootWidth / 4)
- // Scaling factor of the width difference for root width changes: (root.width / playlistColumn.__oldRootWidth)
- readonly property real playlistDefaultWidth: root.width / 4
- readonly property real playlistBindingWidth: playlistDefaultWidth + ((playlistColumn.__newWidth - playlistColumn.__oldRootWidth / 4) * root.width / playlistColumn.__oldRootWidth)
+ // Binding allows playlist to scale when root width changes *even after playlist is resized*
+ // New supposed width of the playlist = root.width / playlistColumn.__widthFactor
+ // Playlist width difference after playlist resize event: (playlistColumn.__newWidth - playlistColumn.__oldRootWidth / playlistColumn.__widthFactor)
+ // Width factor of the width difference for root width changes: (root.width / playlistColumn.__oldRootWidth)
+ readonly property real playlistDefaultWidth: root.width / playlistColumn.__widthFactor
+ readonly property real playlistBindingWidth: playlistDefaultWidth + ((playlistColumn.__newWidth - playlistColumn.__oldRootWidth / playlistColumn.__widthFactor) * root.width / playlistColumn.__oldRootWidth)
readonly property real playlistMinWidth: VLCStyle.dp(225)
readonly property real playlistMaxWidth: root.width / 2
@@ -223,12 +223,13 @@ Widgets.NavigableFocusScope {
right: parent.right
bottom: parent.bottom
}
- width: root.width / 4
+ width: root.width / __widthFactor
visible: false
focus: false
property bool expanded: mainInterface.playlistDocked && mainInterface.playlistVisible
- property int __newWidth : root.width / 4
+ property double __widthFactor : mainInterface.playlistWidthFactor ? mainInterface.playlistWidthFactor : 4.0
+ property int __newWidth : root.width / __widthFactor
property int __oldRootWidth : root.width
onExpandedChanged: {
@@ -367,6 +368,7 @@ Widgets.NavigableFocusScope {
else
return playlistBindingWidth
})
+ mainInterface.setPlaylistWidthFactor(root.width / playlistColumn.width)
}
cursorShape: Qt.SizeHorCursor
}
More information about the vlc-commits
mailing list