This commit is contained in:
marcin
2014-07-09 17:44:13 +02:00
parent 92c594ca8c
commit 692b8532d7
10 changed files with 93 additions and 36 deletions

View File

@@ -2,7 +2,8 @@ import QtQuick 2.0
Item {
height: 37
property string shadowColor
property string shadowPressedColor
property string shadowReleasedColor
property string pressedColor
property string releasedColor
property string icon: ""
@@ -14,16 +15,16 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: buttonArea.pressed ? 1 : 0
y: buttonArea.pressed ? 0 : 1
radius: 4
color: parent.shadowColor
color: buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: buttonArea.pressed ? 0 : 1
y: buttonArea.pressed ? 1 : 0
color: buttonArea.pressed ? parent.pressedColor : parent.releasedColor
radius: 4
}
@@ -35,6 +36,9 @@ Item {
anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
font.family: "Arial"
font.bold: true
font.letterSpacing: -1
font.pixelSize: 12
color: parent.textColor
visible: parent.icon === ""