diff --git a/client/ui/qml/Controls2/TopCloseButtonType.qml b/client/ui/qml/Controls2/TopCloseButtonType.qml index 4a738214..e29b0be4 100644 --- a/client/ui/qml/Controls2/TopCloseButtonType.qml +++ b/client/ui/qml/Controls2/TopCloseButtonType.qml @@ -5,6 +5,8 @@ import QtQuick.Shapes Popup { id: root + property alias buttonWidth: button.implicitWidth + modal: false closePolicy: Popup.NoAutoClose padding: 4 @@ -20,6 +22,8 @@ Popup { } ImageButtonType { + id: button + image: "qrc:/images/svg/close_black_24dp.svg" imageColor: "#D7D8DB" diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index 99132bf1..4af774fa 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -136,6 +136,11 @@ PageType { ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex tabBarStackView.push(pagePath, { "objectName" : pagePath }) } + + onWidthChanged: { + topCloseButton.x = tabBarStackView.x + tabBarStackView.width - + topCloseButton.buttonWidth - topCloseButton.rightPadding + } } TabBar { @@ -231,7 +236,7 @@ PageType { TopCloseButtonType { id: topCloseButton - x: tabBarStackView.width - topCloseButton.width + x: tabBarStackView.width - topCloseButton.buttonWidth - topCloseButton.rightPadding z: 1 }