First implementation
This commit is contained in:
27
qml/Utils/Palette.qml
Normal file
27
qml/Utils/Palette.qml
Normal file
@@ -0,0 +1,27 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick 2.12
|
||||
|
||||
QtObject {
|
||||
property color backgroundColor: "#F7F5F5"
|
||||
property color textFieldBackgroundColor: "#FFFFFF"
|
||||
|
||||
property color borderColor: "#C7C7C7"
|
||||
property color separatorColor: "#C7C7C7"
|
||||
|
||||
property color primaryLabelColor: "#232323"
|
||||
property color secondaryLabelColor: "#232323"
|
||||
property color indicatorLabelColor: "#A6A6A6"
|
||||
|
||||
property color primaryButtonBackgroundColor: "#003ACE"
|
||||
property color primaryButtonPushedBackgroundColor: "#0031AD"
|
||||
property color primaryButtonTextColor: "#FFFFFF"
|
||||
|
||||
property color secondaryButtonBackgroundColor: "#F7F5F5"
|
||||
property color secondaryButtonPushedBackgroundColor: "#E5ECFF"
|
||||
property color secondaryButtonBorderColor: "#003ACE"
|
||||
property color secondaryButtonTextColor: "#003ACE"
|
||||
|
||||
property color timeSectionBackgroundColor: "#F8F8F8"
|
||||
property color statusSectionBackgroundColor: "#FDD855"
|
||||
}
|
||||
18
qml/Utils/Ui.qml
Normal file
18
qml/Utils/Ui.qml
Normal file
@@ -0,0 +1,18 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtQml 2.12
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
|
||||
Item {
|
||||
property real currentWidth: 1024
|
||||
property real currentHeight: 768
|
||||
|
||||
property real referenceWidth: 1024
|
||||
property real referenceHeight: 768
|
||||
|
||||
function scale(size) {
|
||||
const value = Math.max(Math.round(size * Math.min(currentWidth / referenceWidth, currentHeight / referenceHeight)), 1)
|
||||
return value
|
||||
}
|
||||
}
|
||||
3
qml/Utils/qmldir
Normal file
3
qml/Utils/qmldir
Normal file
@@ -0,0 +1,3 @@
|
||||
module Utils
|
||||
singleton Palette 1.0 Palette.qml
|
||||
singleton Ui 1.0 Ui.qml
|
||||
Reference in New Issue
Block a user