2020-05-19 19:49:52 +00:00
|
|
|
import QtQuick 2.7
|
|
|
|
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Controls.Styles 1.4
|
|
|
|
import QtGraphicalEffects 1.12
|
|
|
|
import "." as Widgets
|
2020-05-19 20:25:56 +00:00
|
|
|
import "theme"
|
2020-05-19 19:49:52 +00:00
|
|
|
|
|
|
|
// UnderlineTextField is a textfield styled as just an underline
|
|
|
|
TextField {
|
|
|
|
property alias backgroundColor: bg.color
|
2020-10-19 22:20:38 +00:00
|
|
|
property color errorColor: Theme.textfieldErrorColor
|
|
|
|
property bool error: false
|
2020-05-19 19:49:52 +00:00
|
|
|
|
2020-10-19 22:20:38 +00:00
|
|
|
color: error ? errorColor : Theme.mainTextColor
|
2020-11-20 00:15:50 +00:00
|
|
|
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
2020-05-19 19:49:52 +00:00
|
|
|
signal clicked
|
|
|
|
smooth: true
|
|
|
|
placeholderTextColor: Theme.altTextColor
|
|
|
|
|
2020-11-20 00:15:50 +00:00
|
|
|
// NOTE: Android Password Fields don't work unless we set an explicit character.
|
|
|
|
passwordCharacter: "*"
|
|
|
|
|
2020-05-19 19:49:52 +00:00
|
|
|
background: Rectangle {
|
|
|
|
id: bg
|
|
|
|
anchors.fill: parent
|
|
|
|
color: Theme.backgroundMainColor
|
|
|
|
border.color: color
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: bottomBar
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
height: 2
|
2020-10-19 22:20:38 +00:00
|
|
|
color: error ? errorColor : Theme.mainTextColor
|
2020-05-19 19:49:52 +00:00
|
|
|
}
|
|
|
|
}
|