This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
app/qml/components/InputDelegate.qml
dorian eeb939ed26 - added 'disconnect' functionality for base station
- made IP->adress of base station editable
- some cleanup
2019-03-29 23:42:56 +01:00

61 lines
1.4 KiB
QML

import QtQuick 2.0
import QtQuick.Controls 2.3
SmoothItemDelegate {
id: control
property string inputText: ""
property string inputHint: ""
property int inputMethodHints: Qt.ImhNone
property int inputTextFieldWidth: control.width * 0.3
onInputTextChanged: {
textField.text = inputText
}
text: qsTr("delay (ms)")
width: parent.width
rightPadding: textField.width + width * 0.02
height: parent.delegateHeight
TextField {
id: textField
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: control.inputTextFieldWidth
height: parent.height
focus: true
placeholderText: control.inputHint
font.pixelSize: height * 0.4
inputMethodHints: control.inputMethodHints
palette.text: appTheme.style.textColor
onTextChanged: {
control.inputText = text
control.inputTextChanged()
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
color: "transparent"//control.enabled ? "transparent" : "#353637"
border.color: (textField.activeFocus ? "#21be2b" : "#999999")
radius: height * 0.3
}
Behavior on opacity {
NumberAnimation {
duration: 200
}
}
}
}