1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-03 10:53:39 +02:00
Files
tomahawk/data/qml/tomahawkimports/PushButton.qml
Michael Zanetti a92d7c0f9f warnings--
2012-12-16 19:05:42 +01:00

35 lines
854 B
QML

import QtQuick 1.1
//import tomahawk 1.0
Rectangle {
id: root
height: buttonText.height * 1.4
width: buttonText.width + (spacing * 2)
radius: defaultFontHeight * 0.25
border.width: defaultFontHeight * 0.05
border.color: "#a7a7a7"
gradient: Gradient {
GradientStop { position: 0.0; color: mouseArea.pressed ? "#040404" : "#fbfbfb" }
GradientStop { position: 1.0; color: mouseArea.pressed ? "#8e8f8e" : "#787878" }
}
property int spacing: defaultFontHeight * 0.5
property alias text: buttonText.text
signal clicked()
Text {
id: buttonText
anchors.centerIn: root
font.pointSize: defaultFontSize
color: mouseArea.pressed ? "white" : "black"
}
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: root.clicked()
}
}