diff --git a/qml/components/BigButton.qml b/qml/components/BigButton.qml
new file mode 100644
index 0000000..912cb7b
--- /dev/null
+++ b/qml/components/BigButton.qml
@@ -0,0 +1,27 @@
+// BigButton.qml:
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Rectangle {
+ id: customButton
+ width: parent.width
+ height: Theme.itemSizeExtraLarge
+ color: Theme.secondaryHighlightColor
+ MouseArea {
+ anchors.fill: parent
+ onClicked: customButton.clicked()
+ }
+
+ signal clicked()
+
+ property alias buttonText: buttonText
+
+ Text {
+ id: buttonText
+ text: "Button Text"
+ font.pixelSize: Theme.fontSizeExtraLarge
+ color: Theme.primaryColor
+ anchors.centerIn: parent
+ }
+}
diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml
index 8d7d96a..2f63f47 100644
--- a/qml/pages/FirstPage.qml
+++ b/qml/pages/FirstPage.qml
@@ -1,6 +1,7 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtQuick.Layouts 1.1
+import "../components"
Page {
id: page
@@ -83,9 +84,14 @@ Page {
}
}
- Button {
- text: qsTr("Quit")
- onClicked: Qt.quit()
+ BigButton {
+ buttonText.text: "First Button"
+ onClicked: console.log("First Button clicked!")
+ }
+
+ BigButton {
+ buttonText.text: "Second Button"
+ onClicked: console.log("Second Button clicked!")
}
}
}
diff --git a/qt2.pro b/qt2.pro
index e906fc4..03be887 100644
--- a/qt2.pro
+++ b/qt2.pro
@@ -17,6 +17,7 @@ CONFIG += sailfishapp
SOURCES += src/qt2.cpp
DISTFILES += qml/qt2.qml \
+ qml/components/BigButton.qml \
qml/cover/CoverPage.qml \
qml/pages/FirstPage.qml \
qml/pages/SecondPage.qml \
diff --git a/translations/qt2-de.ts b/translations/qt2-de.ts
index a18ac17..63b1ad1 100644
--- a/translations/qt2-de.ts
+++ b/translations/qt2-de.ts
@@ -22,10 +22,6 @@
Argh
-
- Quit
-
-
SecondPage
diff --git a/translations/qt2.ts b/translations/qt2.ts
index f2e8c4f..8683d7e 100644
--- a/translations/qt2.ts
+++ b/translations/qt2.ts
@@ -22,10 +22,6 @@
Argh
-
- Quit
-
-
SecondPage