Skip to content

Commit 9cc6753

Browse files
committed
Fix closable tab
Set the appropriate color and calculate width better.
1 parent 0c72255 commit 9cc6753

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controls/TabbedPage.qml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ FluidControls.Page {
6969
model: swipeView.contentChildren
7070
delegate: TabButton {
7171
text: modelData.title
72+
implicitWidth: Math.max(background ? background.implicitWidth : 0,
73+
contentItem.implicitWidth +
74+
(tabCloseButton.visible ? tabCloseButton.width : 0) +
75+
leftPadding + rightPadding)
7276
width: parent.fixed ? parent.width / parent.count : implicitWidth
7377

7478
// Active color
@@ -94,9 +98,10 @@ FluidControls.Page {
9498

9599
anchors.right: parent.right
96100
anchors.verticalCenter: parent.verticalCenter
97-
anchors.rightMargin: FluidControls.Units.smallSpacing
101+
anchors.rightMargin: -rightPadding
98102

99103
iconName: "navigation/close"
104+
iconColor: contentItem.color
100105
visible: modelData.canRemove
101106

102107
onClicked: swipeView.removeItem(index)

0 commit comments

Comments
 (0)