Commit c58e8109 authored by Ismael Asensio's avatar Ismael Asensio

[MediaController] Center layout while keeping tabbar hightlight on the edge

Only remove the padding from the tabbar item, to keep the layout centered,
so new elements can be added seamlessly.

The tabbar delegates are also centered on the view by adding this padding
to the top, and removing it from the bottom.
parent 677d5dd8
......@@ -460,8 +460,7 @@ PlasmaComponents3.Page {
}
footer: PlasmaExtras.PlasmoidHeading {
//this removes top padding to allow tabbar to touch the edge
topPadding: -topInset
id: footerItem
location: PlasmaExtras.PlasmoidHeading.Location.Footer
visible: playerList.model.length > 2 // more than one player, @multiplex is always there
......@@ -473,6 +472,9 @@ PlasmaComponents3.Page {
position: PlasmaComponents3.TabBar.Footer
Layout.fillWidth: true
//this removes top padding to allow tabbar to touch the edge
topPadding: -footerItem.topPadding
implicitHeight: contentHeight
Repeater {
......@@ -486,6 +488,9 @@ PlasmaComponents3.Page {
PlasmaComponents3.ToolTip {
text: modelData["text"]
}
// Keep the delegate centered by offsetting the padding removed in the parent
topPadding: verticalPadding + footerItem.topPadding
bottomPadding: verticalPadding - footerItem.topPadding
onClicked: {
disablePositionUpdate = true
mpris2Source.current = modelData["source"];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment