Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r73091a6f5717c0fc88e236c06c618ad361f30a3c -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 73091a6f5717c0fc88e236c06c618ad361f30a3c) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -26,21 +26,27 @@ */ Rectangle { id : _root property alias text : _text + property alias pixelSize : _text.font.pixelSize + property alias fgColor : _text.color + property alias bgColor : _root.color + property bool touchable : true property bool animated : true property bool isDefault : false property bool selectable : false property bool selected : false + readonly property alias isPressed : _mouseArea.pressed + property color textColor : Colors.textButton property color borderColor : Colors.borderButton property color backgroundColor : Colors.backgroundButtonNormal - property color defaultColor : // Colors.backgroundButtonSelect + property color defaultColor : backgroundColor == Colors.transparent ? Colors.backgroundButtonSelect : Qt.lighter(_root.backgroundColor, 1.15) - property color selectColor : // Colors.backgroundButtonSelectDark + property color selectColor : backgroundColor == Colors.transparent ? Colors.backgroundButtonSelectDark : Qt.darker (_root.backgroundColor, 1.15) @@ -84,20 +90,19 @@ radius : Variables.touchRectRadius border.width: Variables.borderWidth - - Text { id: _text - anchors.centerIn: parent + anchors.verticalCenter : parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter color: enabled ? _root.textColor : Colors.textDisableButton font.pixelSize: Fonts.fontPixelButton } MouseArea { id: _mouseArea + enabled : _root.touchable anchors.fill : parent anchors.margins : touchExpanding * -1 onClicked : _root.clicked() onPressed : _root.pressed() onReleased : _root.released() - } }