This commit is contained in:
pokamest 2023-01-08 23:10:46 +00:00
parent 167d3caa5d
commit 8da30b216f
3 changed files with 7 additions and 54 deletions

View file

@ -6,7 +6,7 @@ Item {
readonly property string screenHomeIntroGifEx1: "qrc:/ScreenHomeIntroGifEx1.qml" readonly property string screenHomeIntroGifEx1: "qrc:/ScreenHomeIntroGifEx1.qml"
readonly property int screenWidth: 380 readonly property int screenWidth: 380
readonly property int screenHeight: 640 readonly property int screenHeight: 680
readonly property int defaultMargin: 20 readonly property int defaultMargin: 20
@ -26,20 +26,4 @@ Item {
} }
return false return false
} }
function trX(x) {
return x
}
function trY(y) {
return y
}
function trW(w) {
return w
}
function trH(h) {
return h
}
} }

View file

@ -22,7 +22,6 @@ PageBase {
FlickableType { FlickableType {
id: fl id: fl
anchors.top: caption.bottom anchors.top: caption.bottom
anchors.bottom: logo.top
contentHeight: content.height contentHeight: content.height
ColumnLayout { ColumnLayout {
@ -150,9 +149,4 @@ PageBase {
} }
} }
} }
Logo {
id: logo
anchors.bottom: parent.bottom
}
} }

View file

@ -8,7 +8,6 @@ import Qt.labs.platform
import Qt.labs.folderlistmodel import Qt.labs.folderlistmodel
import QtQuick.Dialogs import QtQuick.Dialogs
import QtQuick.Controls.Basic import QtQuick.Controls.Basic
import "./"
import "Controls" import "Controls"
import "Pages" import "Pages"
import "Pages/Protocols" import "Pages/Protocols"
@ -23,10 +22,10 @@ Window {
id: root id: root
visible: true visible: true
width: GC.screenWidth width: GC.screenWidth
height: GC.isDesktop() ? GC.screenHeight + titleBar.height : GC.screenHeight height: GC.screenHeight
minimumWidth: 360 minimumWidth: GC.isDesktop() ? 360 : 0
minimumHeight: GC.isDesktop() ? 640 : 0 minimumHeight: GC.isDesktop() ? 640 : 0
onClosing: { onClosing: function() {
console.debug("QML onClosing signal") console.debug("QML onClosing signal")
UiLogic.onCloseWindow() UiLogic.onCloseWindow()
} }
@ -85,29 +84,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 { Rectangle {
y: GC.isDesktop() ? titleBar.height : 0 y: GC.isDesktop() ? titleBar.height : 0
anchors.fill: parent anchors.fill: parent
@ -120,16 +96,15 @@ Window {
anchors.fill: parent anchors.fill: parent
focus: true focus: true
onCurrentItemChanged: { onCurrentItemChanged: function() {
//console.debug("QML onCurrentItemChanged " + pageLoader.currentItem)
UiLogic.currentPageValue = currentItem.page UiLogic.currentPageValue = currentItem.page
} }
onDepthChanged: { onDepthChanged: function() {
UiLogic.pagesStackDepth = depth UiLogic.pagesStackDepth = depth
} }
Keys.onPressed: { Keys.onPressed: function(event) {
UiLogic.keyPressEvent(event.key) UiLogic.keyPressEvent(event.key)
event.accepted = true event.accepted = true
} }