[vlc-commits] qml: update labels displayed when the medialibary is empty
Pierre Lamot
git at videolan.org
Fri Jan 10 15:06:46 CET 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Dec 19 16:55:41 2019 +0100| [3d226a86549429957ba361775c6bcc2a72f25ed0] | committer: Jean-Baptiste Kempf
qml: update labels displayed when the medialibary is empty
and make it wrap properly
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d226a86549429957ba361775c6bcc2a72f25ed0
---
modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml | 7 +++++--
modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml | 7 +++++--
modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml | 7 +++++--
modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml | 7 +++++--
modules/gui/qt/medialibrary/qml/VideoDisplay.qml | 7 +++++--
5 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml
index 4236071527..b614e9b371 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml
@@ -222,10 +222,13 @@ Widgets.NavigableFocusScope {
}
Label {
- anchors.centerIn: parent
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
visible: delegateModel.items.count === 0
font.pixelSize: VLCStyle.fontHeight_xxlarge
color: root.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.text
- text: i18n.qtr("No albums found")
+ wrapMode: Text.WordWrap
+ text: i18n.qtr("No albums found\nPlease try adding sources, by going to the Network tab")
}
}
diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
index 661ba0f98c..5f91b2df4f 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
@@ -171,10 +171,13 @@ Widgets.NavigableFocusScope {
}
Label {
- anchors.centerIn: parent
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
visible: delegateModel.items.count === 0
font.pixelSize: VLCStyle.fontHeight_xxlarge
color: root.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.text
- text: i18n.qtr("No artists found")
+ wrapMode: Text.WordWrap
+ text: i18n.qtr("No artists found\nPlease try adding sources, by going to the Network tab")
}
}
diff --git a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
index 175d31b4bb..b5bc63dd9e 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
@@ -193,10 +193,13 @@ Widgets.NavigableFocusScope {
}
Label {
- anchors.centerIn: parent
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
visible: delegateModel.items.count === 0
font.pixelSize: VLCStyle.fontHeight_xxlarge
color: root.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.text
- text: i18n.qtr("No genres found")
+ wrapMode: Text.WordWrap
+ text: i18n.qtr("No genres found\nPlease try adding sources, by going to the Network tab")
}
}
diff --git a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
index bdcd13c136..137d4043f0 100644
--- a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
@@ -92,10 +92,13 @@ Widgets.KeyNavigableTableView {
}
Label {
- anchors.centerIn: parent
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
visible: delegateModel.items.count === 0
font.pixelSize: VLCStyle.fontHeight_xxlarge
color: root.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.text
- text: i18n.qtr("No tracks found")
+ wrapMode: Text.WordWrap
+ text: i18n.qtr("No tracks found\nPlease try adding sources, by going to the Network tab")
}
}
diff --git a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
index 267091d147..7eb87eb2fb 100644
--- a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
@@ -223,10 +223,13 @@ Widgets.NavigableFocusScope {
}
Label {
- anchors.centerIn: parent
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
visible: videosDelegate.items.count === 0
font.pixelSize: VLCStyle.fontHeight_xxlarge
color: root.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.text
- text: i18n.qtr("No tracks found")
+ wrapMode: Text.WordWrap
+ text: i18n.qtr("No video found\nPlease try adding sources, by going to the Network tab")
}
}
More information about the vlc-commits
mailing list