eden/src/eden/qml/config/fields/ConfigIntLine.qml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
578 B
QML
Raw Normal View History

import QtQuick
import QtQuick.Layouts
import org.eden_emu.items
import org.eden_emu.config
import org.eden_emu.constants
BaseField {
contentItem: BetterTextField {
enabled: enable
Layout.fillWidth: true
Layout.rightMargin: 10 * Constants.scalar
inputMethodHints: Qt.ImhDigitsOnly
validator: IntValidator {
bottom: setting.min
top: setting.max
}
font.pixelSize: 15 * Constants.scalar
text: value
suffix: setting.suffix
onTextEdited: value = parseInt(text)
}
}