From e1ca79c29152032151c697b2bb91f9ca196b033e Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Wed, 14 Feb 2018 08:53:52 -0500 Subject: [PATCH] Work in more realistic button layout. --- Menu.qml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Menu.qml b/Menu.qml index 2452bbd..fc0a53b 100644 --- a/Menu.qml +++ b/Menu.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import QtQuick.Controls 1.4 +import QtGraphicalEffects 1.0 Rectangle { anchors.fill: parent @@ -33,7 +34,7 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter width: parent.width - spacing: 5 + spacing: 10 Rectangle { id: button @@ -41,24 +42,36 @@ Rectangle { width: parent.width - 50 height: 50 - radius: 5 + radius: 10 - color: "#777777" + color: "#9e9e9e" 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: "New Game" + font.pointSize: 18 font.bold: true height: 30 - anchors.centerIn: parent + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter } MouseArea { anchors.fill: parent onPressed: button.color = "#555555" + onReleased: button.color = "#9e9e9e" onClicked: { appPage.source = "Board.qml" }