[vlc-commits] qml: revise playlist empty prompt
Fatih Uzunoglu
git at videolan.org
Fri Jul 24 11:46:07 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Tue Jul 7 21:14:24 2020 +0300| [c212e5dc8982a8c7a5edbc34937fe796abd827fa] | committer: Pierre Lamot
qml: revise playlist empty prompt
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c212e5dc8982a8c7a5edbc34937fe796abd827fa
---
modules/gui/qt/playlist/qml/PlaylistListView.qml | 43 +++++++++++++++++++-----
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index 25627a7c15..d0a444adf4 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -497,15 +497,42 @@ Widgets.NavigableFocusScope {
}
}
- Label {
- anchors.fill: parent
+ Column {
+ anchors.centerIn: parent
visible: plmodel.count === 0
- font.pixelSize: VLCStyle.fontHeight_xxlarge
- color: view.activeFocus ? _colors.accent : _colors.text
- text: i18n.qtr("playlist\nis\nempty")
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- padding: VLCStyle.margin_small
+
+ Widgets.IconLabel {
+ font.pixelSize: VLCStyle.dp(48)
+ anchors.horizontalCenter: parent.horizontalCenter
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: VLCIcons.playlist
+ color: view.activeFocus ? _colors.accent : _colors.text
+ opacity: 0.3
+ }
+
+ // ToDo: Use TitleLabel
+ Label {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: VLCStyle.margin_xlarge
+ text: i18n.qtr("No content yet")
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: VLCStyle.fontSize_xxlarge
+ color: view.activeFocus ? _colors.accent : _colors.text
+ opacity: 0.4
+ }
+
+ // ToDo: Use BodyLabel
+ Label {
+ anchors.topMargin: VLCStyle.margin_normal
+ text: i18n.qtr("Drag & Drop some content here!")
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: VLCStyle.fontSize_large
+ color: view.activeFocus ? _colors.accent : _colors.text
+ opacity: 0.4
+ }
}
}
More information about the vlc-commits
mailing list