[vlc-commits] qml: re-layout ExpandGridView when user scale changes
Pierre Lamot
git at videolan.org
Thu Sep 10 16:10:23 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Sep 1 15:13:21 2020 +0200| [93c699301331d14e29081763554213e91418cd86] | committer: Pierre Lamot
qml: re-layout ExpandGridView when user scale changes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93c699301331d14e29081763554213e91418cd86
---
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml | 4 ++--
modules/gui/qt/widgets/qml/ExpandGridView.qml | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
index 63424c406c..547697dd1f 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
@@ -162,14 +162,14 @@ Widgets.NavigableFocusScope {
anchors.fill: parent
Widgets.ListLabel {
- text: rowModel.track_number
+ text: rowModel ? rowModel.track_number : ""
Layout.fillHeight: true
Layout.preferredWidth: VLCStyle.margin_large
}
Widgets.ListLabel {
- text: rowModel.title
+ text: rowModel ? rowModel.title : ""
Layout.fillHeight: true
Layout.fillWidth: true
diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
index d2c46c7c25..94cfbe2300 100644
--- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
+++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
@@ -309,6 +309,11 @@ NavigableFocusScope {
onModelChanged: _onModelCountChanged()
+ Connections {
+ target: mainInterface
+ onIntfScaleFactorChanged: flickable.layout(true)
+ }
+
//Gridview visible above the expanded item
Flickable {
id: flickable
More information about the vlc-commits
mailing list