Index: sources/gui/qml/compounds/NumPad.qml =================================================================== diff -u -rc749ecd5dc413ce091250af652ccba4d96f7a582 -rd4b731494a05087a763afff95b91c675bb417347 --- sources/gui/qml/compounds/NumPad.qml (.../NumPad.qml) (revision c749ecd5dc413ce091250af652ccba4d96f7a582) +++ sources/gui/qml/compounds/NumPad.qml (.../NumPad.qml) (revision d4b731494a05087a763afff95b91c675bb417347) @@ -38,12 +38,10 @@ width : Variables.numPadWidth height : Variables.numPadHeight -// visible : false radius : 9 color : Colors.backgroundMain x : Math.round((Variables.applicationWidth - _root.width) / 2) y : Math.round((Variables.applicationHeight - _root.height) / 2) -// onVisibleChanged : if ( ! _root.visible ) { reset() } onDisplayValueChanged : if ( _root.setter ) { _root.setter( _valueLabel.text ) } onSettingValueChanged : _valueLabel.text = _root.settingValue !== undefined ? _root.settingValue : "" @@ -55,16 +53,6 @@ function open(entry, title, min, max, unit) { reset() setup(entry, title, min, max, unit) -// _root.settingValue = Qt.binding(function () { return entry.text }) -// _root.title = title -// _root.unit = unit -// _root.range = min.isEmpty && -// max.isEmpty ? "" : ("%1 %2 - %3") .arg(qsTr("Range:")) -// .arg(min) -// .arg(max) -// _root.getter = entry.text -// _root.setter = function (value) { entry.text = value } -// _root.validator = function (value) { { return value >= min && value <= max } } _keyboard.setVisible(false) show() } @@ -83,19 +71,17 @@ } function show() { - if ( ! _root.visible ) { _root.visible = true } if ( ! isOpened ) { x = x + _root.width isOpened = true } } - function hide( hideOnly = false ) { + function hide() { if ( isOpened ) { x = x - _root.width isOpened = false } - else if ( _root.visible && ! hideOnly ) { _root.visible = false } } function reset() { @@ -176,7 +162,7 @@ pixelSize : 65 weight : Font.DemiBold } - color : isValueValid ? "white" : "gray" + color : isValueValid ? Colors.offWhite : Colors.red text : "" } } @@ -250,7 +236,7 @@ anchors.centerIn: parent text : _keyButton.text font.pixelSize : 40 - color : enabled ? "white" : "dimgrey" + color : enabled ? Colors.offWhite : "dimgrey" } }