Merge branch 'qt_migration' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel
This commit is contained in:
commit
f24df9fb05
51 changed files with 1044 additions and 906 deletions
|
@ -8,7 +8,6 @@ import Qt.labs.platform
|
|||
import Qt.labs.folderlistmodel
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Controls.Basic
|
||||
import "./"
|
||||
import "Controls"
|
||||
import "Pages"
|
||||
import "Pages/Protocols"
|
||||
|
@ -25,10 +24,10 @@ Window {
|
|||
id: root
|
||||
visible: true
|
||||
width: GC.screenWidth
|
||||
height: GC.isDesktop() ? GC.screenHeight + titleBar.height : GC.screenHeight
|
||||
minimumWidth: 360
|
||||
height: GC.screenHeight
|
||||
minimumWidth: GC.isDesktop() ? 360 : 0
|
||||
minimumHeight: GC.isDesktop() ? 640 : 0
|
||||
onClosing: {
|
||||
onClosing: function() {
|
||||
console.debug("QML onClosing signal")
|
||||
UiLogic.onCloseWindow()
|
||||
}
|
||||
|
@ -88,29 +87,6 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
TitleBar {
|
||||
id: titleBar
|
||||
anchors.top: root.top
|
||||
visible: GC.isDesktop()
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.CanTakeOverFromAnything
|
||||
onActiveChanged: {
|
||||
if (active) {
|
||||
root.startSystemMove();
|
||||
}
|
||||
}
|
||||
target: null
|
||||
}
|
||||
onCloseButtonClicked: {
|
||||
if (UiLogic.currentPageValue === PageEnum.Start ||
|
||||
UiLogic.currentPageValue === PageEnum.NewServer) {
|
||||
Qt.quit()
|
||||
} else {
|
||||
root.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
y: GC.isDesktop() ? titleBar.height : 0
|
||||
anchors.fill: parent
|
||||
|
@ -123,16 +99,15 @@ Window {
|
|||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
onCurrentItemChanged: {
|
||||
//console.debug("QML onCurrentItemChanged " + pageLoader.currentItem)
|
||||
onCurrentItemChanged: function() {
|
||||
UiLogic.currentPageValue = currentItem.page
|
||||
}
|
||||
|
||||
onDepthChanged: {
|
||||
onDepthChanged: function() {
|
||||
UiLogic.pagesStackDepth = depth
|
||||
}
|
||||
|
||||
Keys.onPressed: {
|
||||
Keys.onPressed: function(event) {
|
||||
UiLogic.keyPressEvent(event.key)
|
||||
event.accepted = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue