Skip to content
Snippets Groups Projects
Commit 92577c17 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Rémi Denis-Courmont
Browse files

qml: correct disappearing control spacing

parent cafda671
No related branches found
No related tags found
1 merge request!1795qml: correct disappearing control spacing
Pipeline #216152 passed with stage
in 14 minutes and 21 seconds
......@@ -83,7 +83,7 @@ FocusScope {
anchors.fill: parent
spacing: 0
spacing: playerControlLayout.spacing
Item {
Layout.fillWidth: rightAligned
......@@ -113,17 +113,6 @@ FocusScope {
Layout.minimumWidth: minimumWidth
Layout.fillWidth: expandable
Layout.maximumWidth: item.implicitWidth
// This is a workaround of not using RowLayout's built-in `spacing`
// RowLayout adds an unwanted spacing at the end of the layout so
// this is used instead.
Layout.rightMargin: {
for (var i = index + 1; i < repeater.count; ++i) {
var item = repeater.itemAt(i)
if (!!item && item.visible)
return playerControlLayout.spacing
}
return 0
}
readonly property real minimumWidth: (expandable ? item.minimumWidth : item.implicitWidth)
readonly property bool expandable: (item.minimumWidth !== undefined)
......
......@@ -59,7 +59,8 @@ FocusScope {
top: parent.top
bottom: parent.bottom
rightMargin: layoutSpacing
// Spacing for the filler item acts as padding
rightMargin: layoutSpacing - spacing
}
active: !!playerControlLayout.model
......@@ -124,7 +125,8 @@ FocusScope {
top: parent.top
bottom: parent.bottom
leftMargin: layoutSpacing
// Spacing for the filler item acts as padding
leftMargin: layoutSpacing - spacing
}
active: !!playerControlLayout.model
......
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