mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
46 lines
1.1 KiB
QML
46 lines
1.1 KiB
QML
import QtQuick 2.0
|
|
|
|
Item {
|
|
height: 37
|
|
property string shadowColor
|
|
property string pressedColor
|
|
property string releasedColor
|
|
property string textColor: "#FFFFFF"
|
|
property alias text: label.text
|
|
signal clicked()
|
|
|
|
Rectangle {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
height: parent.height - 1
|
|
y: buttonArea.pressed ? 1 : 0
|
|
radius: 4
|
|
color: parent.shadowColor
|
|
}
|
|
|
|
Rectangle {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
height: parent.height - 1
|
|
y: buttonArea.pressed ? 0 : 1
|
|
color: buttonArea.pressed ? parent.pressedColor : parent.releasedColor
|
|
radius: 4
|
|
}
|
|
|
|
Text {
|
|
id: label
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
horizontalAlignment: Text.AlignHCenter
|
|
elide: Text.ElideRight
|
|
font.pixelSize: 12
|
|
color: parent.textColor
|
|
}
|
|
|
|
MouseArea {
|
|
id: buttonArea
|
|
anchors.fill: parent
|
|
onClicked: parent.clicked()
|
|
}
|
|
}
|