Work in more realistic button layout.

This commit is contained in:
Dorian 2018-02-14 08:53:52 -05:00
parent 2c6ec93484
commit e1ca79c291
1 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,6 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtGraphicalEffects 1.0
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
@ -33,7 +34,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: parent.width width: parent.width
spacing: 5 spacing: 10
Rectangle { Rectangle {
id: button id: button
@ -41,24 +42,36 @@ Rectangle {
width: parent.width - 50 width: parent.width - 50
height: 50 height: 50
radius: 5 radius: 10
color: "#777777" color: "#9e9e9e"
border.color: "#333333" border.color: "#333333"
border.width: 3 border.width: 2
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 5
verticalOffset: 5
radius: 5.0
samples: 5
}
Text { Text {
text: "New Game" text: "New Game"
font.pointSize: 18
font.bold: true font.bold: true
height: 30 height: 30
anchors.centerIn: parent anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onPressed: button.color = "#555555" onPressed: button.color = "#555555"
onReleased: button.color = "#9e9e9e"
onClicked: { onClicked: {
appPage.source = "Board.qml" appPage.source = "Board.qml"
} }