brmbar-github/brmbar3/brmbar-gui-qt4/BarButton.qml
Petr Baudis 3bf0e15af1 Reduce saturation for colors of BarButtons and top bar
This should help the main content of the page stand out better.
2012-10-18 19:27:13 +02:00

35 lines
832 B
QML

// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
Rectangle {
id: rectangle1
width: 240
height: 83
color: "#000000"
border.color: btnColor
property string text: "Button"
property int fontSize: 0.768 * 60
property variant btnColor: "#aaaaaa"
signal buttonClick
onButtonClick: { /* Supplied by component user. */ }
Text {
id: text1
text: parent.text
color: parent.btnColor
font.pixelSize: parent.fontSize
scale: if (!mousearea1.pressed) { 1 } else { 0.95 }
horizontalAlignment: Text.AlignHCenter
anchors.fill: parent
smooth: true
verticalAlignment: Text.AlignVCenter
}
MouseArea {
id: mousearea1
anchors.fill: parent
onClicked: buttonClick()
}
}