Skip to content
Snippets Groups Projects
Commit 96caf7e8 authored by Benjamin Arnaud's avatar Benjamin Arnaud Committed by Jean-Baptiste Kempf
Browse files

qml/VideoDisplayRecentVideos: Fix positioning and margins

parent ba2f6837
No related branches found
No related tags found
No related merge requests found
......@@ -220,16 +220,19 @@ VideoAll {
}
header: VideoDisplayRecentVideos {
width: root.width
width: root.width - displayMarginBeginning - displayMarginEnd
subtitleText: (root.model && root.model.count > 0) ? I18n.qtr("Videos") : ""
// NOTE: We want grid items to be visible on the sides.
leftPadding: root.contentMargin
x: displayMarginBeginning
// spacing between header and content
bottomPadding: VLCStyle.margin_normal
subtitleText: (root.model && root.model.count > 0) ? I18n.qtr("Videos") : ""
// NOTE: We want grid items to be visible on the sides.
displayMarginBeginning: root.contentMargin
displayMarginEnd: displayMarginBeginning
Navigation.parentItem: root
Navigation.downAction: function() {
......
......@@ -30,11 +30,13 @@ import "qrc:///style/"
FocusScope {
id: root
property alias leftPadding: recentVideosColumn.leftPadding
property alias rightPadding: recentVideosColumn.rightPadding
property alias topPadding: recentVideosColumn.topPadding
// Aliases
property alias bottomPadding: recentVideosColumn.bottomPadding
property alias displayMarginBeginning: listView.displayMarginBeginning
property alias displayMarginEnd: listView.displayMarginEnd
property alias subtitleText : subtitleLabel.text
// Settings
......@@ -70,13 +72,15 @@ FocusScope {
Widgets.SubtitleLabel {
text: I18n.qtr("Continue Watching")
// NOTE: Setting this to listView.visible seems to causes unnecessary implicitHeight
// calculations in the Column parent.
visible: listView.count > 0
}
Widgets.KeyNavigableListView {
id: listView
width: root.width - root.leftPadding - root.rightPadding
width: parent.width
implicitHeight: VLCStyle.gridItem_video_height + VLCStyle.gridItemSelectedBorder
+
......@@ -84,10 +88,6 @@ FocusScope {
spacing: VLCStyle.column_margin_width
// NOTE: Sometimes, we want items to be visible on the sides.
displayMarginBeginning: 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment