2026-02-17 11:29:04 +04:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import Logos.Theme
|
|
|
|
|
|
2026-02-22 16:37:27 +04:00
|
|
|
// qmllint disable unqualified
|
2026-02-17 11:29:04 +04:00
|
|
|
TextField {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
property bool isValid: acceptableInput && text.length > 0
|
|
|
|
|
|
|
|
|
|
placeholderTextColor: Theme.palette.textPlaceholder
|
|
|
|
|
color: isValid ? Theme.palette.text : Theme.palette.error
|
|
|
|
|
selectByMouse: true
|
|
|
|
|
background: Rectangle {
|
2026-02-22 16:37:27 +04:00
|
|
|
|
2026-02-17 11:29:04 +04:00
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
color: Theme.palette.backgroundSecondary
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Border bottom
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: 1
|
|
|
|
|
color: root.isValid ? Theme.palette.textMuted : Theme.palette.error
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|