qml ui fixes
This commit is contained in:
parent
57234bc793
commit
27171ed974
43 changed files with 311 additions and 262 deletions
43
client/ui/qml/Config/GlobalConfig.qml
Normal file
43
client/ui/qml/Config/GlobalConfig.qml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.12
|
||||
|
||||
Item {
|
||||
readonly property string screenHome: "qrc:/ScreenHome.qml"
|
||||
readonly property string screenHomeIntroGifEx1: "qrc:/ScreenHomeIntroGifEx1.qml"
|
||||
|
||||
readonly property int screenWidth: 380
|
||||
readonly property int screenHeight: 640
|
||||
|
||||
function isMobile() {
|
||||
if (Qt.platform.os == "android" ||
|
||||
Qt.platform.os == "ios") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function isDesktop() {
|
||||
if (Qt.platform.os == "windows" ||
|
||||
Qt.platform.os == "linux" ||
|
||||
Qt.platform.os == "osx") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function trX(x) {
|
||||
return x
|
||||
}
|
||||
|
||||
function trY(y) {
|
||||
return y
|
||||
}
|
||||
|
||||
function trW(w) {
|
||||
return w
|
||||
}
|
||||
|
||||
function trH(h) {
|
||||
return h
|
||||
}
|
||||
}
|
||||
1
client/ui/qml/Config/qmldir
Normal file
1
client/ui/qml/Config/qmldir
Normal file
|
|
@ -0,0 +1 @@
|
|||
singleton GC 1.0 GlobalConfig.qml
|
||||
Loading…
Add table
Add a link
Reference in a new issue