summaryrefslogtreecommitdiffstats
path: root/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-10-23 12:16:08 +0300
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-11-22 10:41:45 +0000
commit36944272925a3e91b97e82f6c541ae97af3099f7 (patch)
tree284d74220c132e6f5161984eb35f3acdde81d06d /src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
parent7ff2eba7a3b1f63ae50fbed15cff17e12a64dc41 (diff)
Fix border image drawing for corner cut buttons
Three corrections: - Previously border was drawn along the border of the rectangle. This caused half of the pen to remain outside of the rectangle and border looked strange. - The default border width should be 2 - Pressed button should show darker screen borders Task-number: QTBUG-60083 Change-Id: I1677a252bd3fd14b69389bfa568787a1e8c15676 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/settingsui/qtbuttonimageproviderplugin/QtButton.qml')
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/QtButton.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml b/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
index 9501aa1..6fb61f4 100644
--- a/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
+++ b/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
@@ -34,14 +34,15 @@ Image {
sourceSize: Qt.size(width, height)
property string state: "enabled"
property int cutSize: 10
- property color fillColor: "white"
- property color borderColor: "black"
+ property color fillColor: viewSettings.buttonGreenColor
+ property color borderColor: mouseArea.pressed ? viewSettings.buttonActiveColor : viewSettings.buttonGreenColor
property alias text: buttonText.text
signal clicked()
width: buttonText.contentWidth + cutSize * 4
MouseArea {
+ id: mouseArea
anchors.fill: parent
onClicked: root.clicked()
}