Index: sources/gui/qml/components/NumPad.qml =================================================================== diff -u -r31b1e7a5d69f014398827e16286f28515cd60e35 -r23121e17d1a6120ae4a31930e18de362d9533bcb --- sources/gui/qml/components/NumPad.qml (.../NumPad.qml) (revision 31b1e7a5d69f014398827e16286f28515cd60e35) +++ sources/gui/qml/components/NumPad.qml (.../NumPad.qml) (revision 23121e17d1a6120ae4a31930e18de362d9533bcb) @@ -34,7 +34,6 @@ readonly property bool isValueValid : validator ? validator(valueInt) : true readonly property var valueInt : isNaN(parseInt(_valueLabel.text)) ? undefined : parseInt(_valueLabel.text) readonly property string backSpace : "qrc:/images/iBackspace" - property bool slideToOpen : false property bool isOpened : false @@ -47,23 +46,12 @@ radius : 9 color : Colors.transparent - layer.enabled : ! slideToOpen - layer.effect : DropShadow { id: _dropShadow - horizontalOffset: 4 - verticalOffset : 4 - radius : 12 - samples : 32 - color : Colors.dropShadowDialogColor - source : _root - anchors.fill : _root - } - signal cancel() x: Math.round((Variables.applicationWidth - _root.width) / 2) y: Math.round((Variables.applicationHeight - _root.height) / 2) - // slide animation for slideToOpen + // slide animation Behavior on x { NumberAnimation { duration: Variables.keybardAnimationDuration } } function open(entry, title, min, max, unit) { @@ -83,38 +71,19 @@ } function show() { + if ( ! _root.visible ) { _root.visible = true } if ( ! isOpened ) { - if ( ! _root.visible ) - { - _root.visible = true - } - - if ( slideToOpen ) - { - print("show x: " + x) - x = x + _root.width - } - + x = x + _root.width isOpened = true } } function hide() { if ( isOpened ) { - if ( slideToOpen ) - { - print("hide x: " + x) - - x = x - _root.width - } - - else if ( _root.visible ) - { - _root.visible = false - } - + x = x - _root.width isOpened = false } + else if ( _root.visible ) { _root.visible = false } } function reset() { @@ -140,40 +109,25 @@ } } - CloseButton { id : _closeButton - anchors { - top : parent.top - left : parent.left - margins : 10 - } - visible: ! slideToOpen - - onClicked: { - cancel() - reset() - } - } - TouchRect { id : _sliderButton anchors { verticalCenter : parent.verticalCenter left : parent.right leftMargin : height / 2 * -1 } - z : -1 - width : 100 - height : 100 - radius : height - border.color: Colors.transparent + z : -1 + height : 80 + width : height + radius : height + border.color : Colors.transparent backgroundColor : "#455B78" onPressed : isOpened ? hide() : show() Image { id : _iconImage anchors { - verticalCenter : parent.verticalCenter right : parent.right - rightMargin : 15 + rightMargin : 5 } height : Variables.headerIconDiameter width : Variables.headerIconDiameter @@ -186,7 +140,7 @@ Text { id: _title anchors { top : _root.top - topMargin : 5 + topMargin : 10 horizontalCenter: _root.horizontalCenter } font { @@ -231,7 +185,7 @@ Text { id: _range anchors { bottom : _numRect.top - bottomMargin : 10 + bottomMargin : 15 horizontalCenter: parent.horizontalCenter } font.pixelSize : 20