mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
update x value of topbutton when resize window
This commit is contained in:
@@ -5,6 +5,8 @@ import QtQuick.Shapes
|
|||||||
Popup {
|
Popup {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property alias buttonWidth: button.implicitWidth
|
||||||
|
|
||||||
modal: false
|
modal: false
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
padding: 4
|
padding: 4
|
||||||
@@ -20,6 +22,8 @@ Popup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
|
id: button
|
||||||
|
|
||||||
image: "qrc:/images/svg/close_black_24dp.svg"
|
image: "qrc:/images/svg/close_black_24dp.svg"
|
||||||
imageColor: "#D7D8DB"
|
imageColor: "#D7D8DB"
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ PageType {
|
|||||||
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
|
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
|
||||||
tabBarStackView.push(pagePath, { "objectName" : pagePath })
|
tabBarStackView.push(pagePath, { "objectName" : pagePath })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onWidthChanged: {
|
||||||
|
topCloseButton.x = tabBarStackView.x + tabBarStackView.width -
|
||||||
|
topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
@@ -231,7 +236,7 @@ PageType {
|
|||||||
|
|
||||||
TopCloseButtonType {
|
TopCloseButtonType {
|
||||||
id: topCloseButton
|
id: topCloseButton
|
||||||
x: tabBarStackView.width - topCloseButton.width
|
x: tabBarStackView.width - topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||||
z: 1
|
z: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user