summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSayan Biswas <[email protected]>2015-05-10 10:38:29 +0530
committerSayan Biswas <[email protected]>2015-05-10 10:38:29 +0530
commit49691520b9f0343f41db3c1238655521fd5a7559 (patch)
tree0839ec1610f7ea6c3c38238c041a465ba39e3f01
parent26843a97bd3b57a32d13e9ed20d33bcc3bcb5a5e (diff)
Added shadow effect to the buttons
-rw-r--r--src/qml/GamePage.qml15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/qml/GamePage.qml b/src/qml/GamePage.qml
index 89fac66..c9e59e4 100644
--- a/src/qml/GamePage.qml
+++ b/src/qml/GamePage.qml
@@ -25,6 +25,7 @@ import QtQuick.Controls.Styles 1.2
import QtQuick.Window 2.2
import QtMultimedia 5.0
import QtQml 2.2
+import QtGraphicalEffects 1.0
Item {
@@ -501,7 +502,6 @@ Item {
model: alphabet;
Button {
id: alphabetButton;
-
property string letter: modelData
property string buttonColor: "black"
@@ -513,6 +513,17 @@ Item {
implicitHeight: gamePage.width / 22
color: buttonColor
radius: 8
+ layer.enabled: true
+ layer.effect: DropShadow {
+ radius: 4
+ horizontalOffset: 3
+ verticalOffset: 3
+ spread: 0
+ samples: radius * 2
+ source: alphabetLetterIdStyleRectangle
+ color: Qt.rgba(0, 0, 0, 0.5)
+ transparentBorder: true
+ }
}
label: Text {
id: buttonLabel
@@ -527,7 +538,7 @@ Item {
color: parent.enabled ? "white" : "grey"
}
}
-
+
onClicked: {
guessLetter(modelData);
}