diff --git a/qml/StartPage.qml b/qml/StartPage.qml index b6a28e0..6a8ac7e 100644 --- a/qml/StartPage.qml +++ b/qml/StartPage.qml @@ -11,6 +11,18 @@ Page { } signal pageOpened() + GameComboBox { + height: 40 + width: 140 + } + ComboBox { + anchors { + top: parent.top + topMargin: 40 + } + } + + /* GameButton { id: calenderButton text: "calender" @@ -40,4 +52,5 @@ Page { game.calculator() } } + */ } diff --git a/qml/components/GameComboBox.qml b/qml/components/GameComboBox.qml new file mode 100644 index 0000000..014733c --- /dev/null +++ b/qml/components/GameComboBox.qml @@ -0,0 +1,20 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.2 + +Item { + property string clickedColor: "#BDBDBD" + property string normalColor: "#e0e0e0" + property string color: normalColor + Rectangle { + color: parent.color + width: parent.width + height: parent.height + } + + MouseArea { + width: parent.width + height: parent.height + onPressed: parent.color = parent.clickedColor + onReleased: parent.color = parent.normalColor + } +} diff --git a/qml/qml.qrc b/qml/qml.qrc index a9a893e..7464ec5 100644 --- a/qml/qml.qrc +++ b/qml/qml.qrc @@ -11,5 +11,6 @@ calender/CalenderRunningPage.qml calender/CalenderGameOverPage.qml components/GameButton.qml + components/GameComboBox.qml