~f-riccardo87/ubuntu-calculator-app/new-design

« back to all changes in this revision

Viewing changes to KeyboardButton.qml

  • Committer: Tarmac
  • Author(s): Dalius, Riccardo Ferrazzo
  • Date: 2013-02-24 14:32:52 UTC
  • mfrom: (7.1.21 ubuntu-calculator-app)
  • Revision ID: tarmac-20130224143252-lz4puf6xvq515jtt
Many UI improvements. More scientific buttons.

Approved by Riccardo Ferrazzo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import Ubuntu.Components 0.1
 
3
 
 
4
Rectangle {
 
5
    id: buttonRect
 
6
    width: units.gu(9)
 
7
    height: units.gu(6)
 
8
    radius: units.gu(1)
 
9
    color: buttonMA.pressed ? "#c0c0c0" : "white"
 
10
 
 
11
    property alias text: buttonText.text
 
12
 
 
13
    signal clicked()
 
14
 
 
15
    Text {
 
16
        id: buttonText
 
17
        anchors.centerIn: parent
 
18
        color: "#dd4814"
 
19
        font.pixelSize: units.gu(3)
 
20
    }
 
21
 
 
22
    MouseArea {
 
23
        id: buttonMA
 
24
        anchors.fill: parent
 
25
        onClicked: buttonRect.clicked()
 
26
    }
 
27
}