Commit 150ca616 authored by Ionut Alexandrescu's avatar Ionut Alexandrescu

Font change from points to pixels

parent 01a503bc
......@@ -5,21 +5,20 @@ import App 1.0
Rectangle
{
property alias textField: textFieldItem
width: 200
height: 40
width: 250
height: 45
color: "#0b2a4a"
border.color: "#0a0f2c"
radius: 10
radius: 15
TextInput
{
id: textFieldItem
anchors.fill: parent
anchors.leftMargin: 10
anchors.topMargin: 5
//text: qsTr("Enter")
font.pixelSize: 20
text: qsTr("Test")
font.pixelSize: Variables.fontUserAuth2
verticalAlignment: Text.AlignVCenter
color: "#42cc53"
}
}
......@@ -9,7 +9,7 @@ Button {
height: 53
width: 150
font.pointSize: Variables.footerButtonPoints
font.pixelSize: Variables.fontFooterButton
flat: true
opacity: 0
......
import QtQuick 2.8
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import App 1.0
Item {
......@@ -27,7 +28,7 @@ Item {
verticalAlignment: Text.AlignVCenter
color: "#ffffff"
text: qsTr("Electric charging station")
font.pointSize: 18
font.pixelSize: Variables.fontHeader
font.bold: true
}
}
......
......@@ -128,7 +128,7 @@ Item {
y: 170
color: "#979eb6"
text: qsTr("Charging Rate 200 Mi/hr 355V 191A")
font.pointSize: 10
font.pixelSize: Variables.fontChargingRate
}
}
......
......@@ -13,6 +13,7 @@ Button
property int keyId: 16
property alias buttonText: labelItem.text
property alias buttonColor: back.color
property alias fontSize: labelItem.font.pixelSize
background: Rectangle
......@@ -30,7 +31,7 @@ Button
anchors.fill: parent
color: "#ffffff"
text: "0"
font.pointSize: Variables.fontKeys
font.pixelSize: Variables.fontKeys
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
......
......@@ -24,126 +24,127 @@ Item
x: 20
y: 20
spacing: 10
Column
{
spacing: 10
PadPin
{
keyId: 7
buttonText: "7"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 4
buttonText: "4"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 1
buttonText: "1"
onPressed: pressedButton(keyId)
}
}
Column
{
spacing: 10
PadPin
{
keyId: 8
buttonText: "8"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 5
buttonText: "5"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 2
buttonText: "2"
onPressed: pressedButton(keyId)
}
PadPin
Column
{
keyId: 0
buttonText: "0"
onPressed: pressedButton(keyId)
spacing: 10
PadPin
{
keyId: 7
buttonText: "7"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 4
buttonText: "4"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 1
buttonText: "1"
onPressed: pressedButton(keyId)
}
}
}
Column
{
spacing: 10
PadPin
{
keyId: 9
buttonText: "9"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 6
buttonText: "6"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 3
buttonText: "3"
onPressed: pressedButton(keyId)
}
}
Column
{
spacing: 10
PadPin
Column
{
keyId: 10
buttonText: qsTr("Cancel")
buttonColor: "#ce0203"
width: 130
onPressed: pressedButton(keyId)
spacing: 10
PadPin
{
keyId: 8
buttonText: "8"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 5
buttonText: "5"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 2
buttonText: "2"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 0
buttonText: "0"
onPressed: pressedButton(keyId)
}
}
PadPin
Column
{
keyId: 11
buttonText: qsTr("Correct")
buttonColor: "#d1a601"
width: 130
onPressed: pressedButton(keyId)
spacing: 10
PadPin
{
keyId: 9
buttonText: "9"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 6
buttonText: "6"
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 3
buttonText: "3"
onPressed: pressedButton(keyId)
}
}
PadPin
Column
{
keyId: 12
buttonText: qsTr("Help")
buttonColor: "#0e6bcb"
width: 130
onPressed: pressedButton(keyId)
spacing: 10
PadPin
{
keyId: 10
fontSize: Variables.fontKeysText
buttonText: qsTr("Cancel")
buttonColor: "#ce0203"
width: 130
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 11
fontSize: Variables.fontKeysText
buttonText: qsTr("Correct")
buttonColor: "#d1a601"
width: 130
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 12
fontSize: Variables.fontKeysText
buttonText: qsTr("Help")
buttonColor: "#0e6bcb"
width: 130
onPressed: pressedButton(keyId)
}
PadPin
{
keyId: 13
fontSize: Variables.fontKeysText
buttonText: qsTr("Enter")
buttonColor: "#65cd52"
width: 130
onPressed: pressedButton(keyId)
}
}
PadPin
{
keyId: 13
buttonText: qsTr("Enter")
buttonColor: "#65cd52"
width: 130
onPressed: pressedButton(keyId)
}
}
}
}
import QtQuick 2.8
import QtQuick.Controls 2.0
import App 1.0
Page {
id: root
......@@ -27,7 +28,9 @@ Page {
Text {
id: text1
text: qsTr("Username:")
font.pointSize: 20
font.pixelSize: Variables.fontUserAuth
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
color: "#0a0f2c"
}
......@@ -38,7 +41,9 @@ Page {
Text {
id: text2
text: qsTr("Password:")
font.pointSize: 20
font.pixelSize: Variables.fontUserAuth
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
color: "#0a0f2c"
}
......@@ -58,7 +63,7 @@ Page {
contentItem: Label {
color: "#00DB52"
text: qsTr("USER AUTHENTICATION")
font.pixelSize: 18
font.pixelSize: Variables.fontTapStart
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
......
......@@ -37,11 +37,11 @@ Page {
Text
{
anchors.bottom: spinBoxes.top
anchors.bottomMargin: 20
anchors.bottomMargin: 10
anchors.left: spinBoxes.left
color: "#fefefe"
text: qsTr("Select charging level")
font.pointSize: 16
font.pixelSize: Variables.fontSelectCharging
}
DialBase
......
......@@ -48,7 +48,7 @@ Page {
width: 230
height: 34
x: 20
font.pointSize: 16
font.pixelSize: Variables.fontChargingProgress
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignVCenter
}
......@@ -88,11 +88,11 @@ Page {
Text
{
id: infoText
x: 120
x: 110
anchors.verticalCenter: parent.verticalCenter
color: "#42cc53"
text: "00%"
font.pointSize: 38
font.pixelSize: Variables.fontChargingPercentage
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
......
......@@ -19,7 +19,7 @@ Page
{
color: "#ffffff"
text: qsTr("Payment method")
font.pointSize: 18
font.pixelSize: Variables.fontPayment
x: 80
y: 35
}
......@@ -33,9 +33,9 @@ Page
Text
{
id: textEnterPIN
font.pixelSize: Variables.fontPayment
color: "#ffffff"
text: qsTr("Enter PIN-number:")
font.pointSize: 18
x: 410
y: 35
}
......@@ -56,7 +56,7 @@ Page
id: textField
color: "#ffffff"
text: ""
font.pointSize: 18
font.pixelSize: Variables.fontPaymentPin
horizontalAlignment: TextInput.AlignHCenter
verticalAlignment: Text.AlignVCenter
......
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtMultimedia 5.8
import App 1.0
Page {
id: root
......@@ -37,7 +38,7 @@ Page {
contentItem: Label {
color: "#00DB52"
text: qsTr("TAP TO START")
font.pixelSize: 18
font.pixelSize: Variables.fontTapStart
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
......
import QtQuick 2.6
import QtQuick.Controls 2.2
import App 1.0
import QtQuick.Layouts 1.0
import App 1.0
Item
......@@ -62,7 +63,7 @@ Item
{
color: "#ffffff"
text: qsTr("Total cost")
font.pointSize: 24
font.pixelSize: Variables.fontTotalCost
x: 30
y: 150
}
......@@ -71,7 +72,7 @@ Item
{
color: "#ffffff"
text: Number(Variables.currentPrice / 100).toLocaleString(locale, 'f', 2) + " \u20ac"
font.pointSize: 40
font.pixelSize: Variables.fontPaymentCost
x: 30
y: 190
}
......
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import App 1.0
Popup {
id: popup
......@@ -53,7 +54,7 @@ Popup {
contentItem: Text {
id: textId
color: "#ffffff"
font.pointSize: 20
font.pixelSize: Variables.fontInfo
wrapMode: Text.WordWrap
text: ""
}
......
......@@ -8,7 +8,7 @@ SpinBox {
editable: true
width: 230
height: 34
font.pointSize: Variables.controlSpinFontPoints
font.pixelSize: Variables.fontControlSpinBox
property bool indicatorText: true;
......
......@@ -8,12 +8,23 @@ QtObject {
readonly property double timeOnePercent: 0.2
readonly property double timeToComplete: 60000
readonly property real fontKeys: 25
readonly property real fontKeysText: 20
readonly property real bigFontPoints: 36
readonly property real mediumFontPoints: 30
readonly property real controlSpinFontPoints: 24
readonly property real footerButtonPoints: 20
readonly property real fontHeader: 30
readonly property real fontFooterButton: 25
readonly property real fontTapStart: 18
readonly property real fontUserAuth: 30
readonly property real fontUserAuth2: 20
readonly property real fontSelectCharging: 20
readonly property real fontChargingRate: 16
readonly property real fontControlSpinBox: 25
readonly property real fontKeys: 35
readonly property real fontKeysText: 30
readonly property real fontPayment: 20
readonly property real fontInfo: 30
readonly property real fontPaymentPin: 25
readonly property real fontTotalCost: 25
readonly property real fontPaymentCost: 50
readonly property real fontChargingProgress: 20
readonly property real fontChargingPercentage: 60
property double currentPrice: 0
property double wantedCharge: 0
......
......@@ -141,7 +141,6 @@ ApplicationWindow {
break;
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment