Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -rd4b88173e0d4a683a315d2fc57b8e1ec356b1232 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 94f7349bd073a732dba5295250fc0e26f740743c) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision d4b88173e0d4a683a315d2fc57b8e1ec356b1232) @@ -14,7 +14,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Project // Qml imports @@ -38,6 +37,8 @@ property color borderColor : Colors.borderButton property color backgroundColor : Colors.backgroundButtonNormal + signal clicked + onDurationChanged: { _colorAnimationOn .duration = duration; _colorAnimationOff.duration = duration; @@ -55,10 +56,6 @@ } } - onBackgroundColorChanged: { - _root.color = backgroundColor - } - onDisabledChanged: { if (disabled) { text.color = Colors.textDisableButton @@ -74,19 +71,20 @@ radius : Variables.touchRectRadius color : backgroundColor border { - color: Colors.borderButton + color: borderColor width: Variables.borderWidth } Text { id: _text anchors.centerIn: parent - color: Colors.textMain + color: textColor font.pixelSize: Fonts.fontPixelButton } MouseArea { id: _mouseArea anchors.fill: parent - onPressed: { + onClicked : { if ( disabled ) { return } animate(true) + _root.clicked() } }