[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix padding in VideoDisplayRecentVideos
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Fri Apr 22 10:05:46 UTC 2022
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
f98a69c5 by Prince Gupta at 2022-04-22T09:40:56+00:00
qml: fix padding in VideoDisplayRecentVideos
fixup d8f6e988339
- - - - -
06e156b0 by Prince Gupta at 2022-04-22T09:40:56+00:00
qml: don't show Video subtitle in video view when no video is available
- - - - -
01476d5c by Prince Gupta at 2022-04-22T09:40:56+00:00
qml: fix warning
- - - - -
3 changed files:
- modules/gui/qt/medialibrary/qml/VideoAll.qml
- modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/VideoAll.qml
=====================================
@@ -99,7 +99,7 @@ FocusScope {
}
function resetFocus() {
- if (model.count === 0) return
+ if (!model || model.count === 0) return
var initialIndex = root.initialIndex
=====================================
modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
=====================================
@@ -213,6 +213,8 @@ VideoAll {
header: VideoDisplayRecentVideos {
width: root.width
+ subtitleText: (root.model && root.model.count > 0) ? I18n.qtr("Videos") : ""
+
// NOTE: We want grid items to be visible on the sides.
leftPadding: root.contentMargin
=====================================
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
=====================================
@@ -33,6 +33,8 @@ FocusScope {
property alias leftPadding: recentVideosColumn.leftPadding
property alias rightPadding: recentVideosColumn.rightPadding
+ property alias subtitleText : subtitleLabel.text
+
// Settings
implicitHeight: recentVideosColumn.height
@@ -84,7 +86,7 @@ FocusScope {
// NOTE: Sometimes, we want items to be visible on the sides..
displayMarginBeginning: root.leftPadding
- displayMarginEnd: root.leftPadding
+ displayMarginEnd: root.rightPadding
// NOTE: We want navigation buttons to be centered on the item cover.
buttonMargin: VLCStyle.margin_xsmall + VLCStyle.gridCover_video_height / 2 - buttonLeft.height / 2
@@ -180,7 +182,9 @@ FocusScope {
}
Widgets.SubtitleLabel {
- text: I18n.qtr("Videos")
+ id: subtitleLabel
+
+ visible: text !== ""
}
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/44d44176aaadd4f742a70e9188f6ba578d65fab1...01476d5c4e3623f21a860fee66fe844a046a1bd7
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/44d44176aaadd4f742a70e9188f6ba578d65fab1...01476d5c4e3623f21a860fee66fe844a046a1bd7
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