First implementation
This commit is contained in:
34
qml/Controls/TextField.qml
Normal file
34
qml/Controls/TextField.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12 as QuickControls
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
QuickControls.TextField {
|
||||
id: control
|
||||
|
||||
implicitHeight: Ui.scale(50)
|
||||
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
topPadding: Ui.scale(12)
|
||||
bottomPadding: Ui.scale(12)
|
||||
leftPadding: Ui.scale(24)
|
||||
rightPadding: Ui.scale(24)
|
||||
|
||||
font.family: "Roboto"
|
||||
font.pixelSize: Ui.scale(21)
|
||||
font.weight: Font.Bold
|
||||
|
||||
color: Palette.primaryLabelColor
|
||||
|
||||
background: Rectangle {
|
||||
radius: Ui.scale(5)
|
||||
color: Palette.textFieldBackgroundColor
|
||||
border.width: Ui.scale(1)
|
||||
border.color: control.acceptableInput ? Palette.borderColor : "red"
|
||||
|
||||
width: control.width
|
||||
height: control.height
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user