Files
amnezia-client/client/ui/qml/main2.qml
T

53 lines
1.1 KiB
QML
Raw Normal View History

import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
2023-06-01 11:25:33 +08:00
import PageEnum 1.0
import "Config"
2023-06-01 11:25:33 +08:00
import "Controls2"
Window {
id: root
visible: true
width: GC.screenWidth
height: GC.screenHeight
minimumWidth: GC.isDesktop() ? 360 : 0
minimumHeight: GC.isDesktop() ? 640 : 0
color: "#0E0E11"
// todo
onClosing: function() {
console.debug("QML onClosing signal")
UiLogic.onCloseWindow()
}
title: "AmneziaVPN"
2023-06-01 11:25:33 +08:00
StackViewType {
id: rootStackView
anchors.fill: parent
focus: true
2023-06-01 11:25:33 +08:00
Component.onCompleted: {
2023-06-05 15:49:10 +08:00
var pagePath = PageController.getInitialPage()
2023-06-01 11:25:33 +08:00
rootStackView.push(pagePath, { "objectName" : pagePath })
}
}
Connections {
target: PageController
function onReplaceStartPage() {
var pagePath = PageController.getInitialPage()
while (rootStackView.depth > 1) {
rootStackView.pop()
}
rootStackView.replace(pagePath, { "objectName" : pagePath })
}
}
}