~dpm/sudoku-app/rm-pot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import QtQuick 2.3
import Ubuntu.Components 1.1

Rectangle {
    id: button
    property alias buttonColor: button.color;
    property color textColor: sudokuBlocksGrid.defaultTextColor
    property real size: mainView.blockSize;
    property string buttonText: "";
    property bool boldText: false;


    signal buttonClick()
    height: size;
    width: size;
    //radius: "medium"
    color: buttonColor
    //border.color: Qt.darker(buttonColor,1.5)

    Text {
        id: buttonText
        text: button.buttonText;
        color: textColor;
        anchors.centerIn: parent
        font.pixelSize: FontUtils.sizeToPixels("large")
        font.bold: boldText;
    }

    //determines the color of the button by using the conditional operator
    //color: buttonMouseArea.pressed ? Qt.darker(color, 1.5) : color
}