summaryrefslogtreecommitdiffstats
path: root/qml/MButton.qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2019-03-26 13:32:29 +0100
committerPapoteur <papoteur@mageia.org>2019-03-26 14:23:39 +0100
commit406312b33d6737ba840794510eca6d0eafbc40ab (patch)
tree960f8504b1dc1b1ba311f32b5dea74e13f15c9a8 /qml/MButton.qml
parentc615fee86e2d8ccb860413a727c20878e040f982 (diff)
downloadmageiawelcome-406312b33d6737ba840794510eca6d0eafbc40ab.tar
mageiawelcome-406312b33d6737ba840794510eca6d0eafbc40ab.tar.gz
mageiawelcome-406312b33d6737ba840794510eca6d0eafbc40ab.tar.bz2
mageiawelcome-406312b33d6737ba840794510eca6d0eafbc40ab.tar.xz
mageiawelcome-406312b33d6737ba840794510eca6d0eafbc40ab.zip
Introduce special MButton
Diffstat (limited to 'qml/MButton.qml')
-rw-r--r--qml/MButton.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/qml/MButton.qml b/qml/MButton.qml
new file mode 100644
index 0000000..f7085e3
--- /dev/null
+++ b/qml/MButton.qml
@@ -0,0 +1,21 @@
+// MButton.qml
+// Customized button
+import QtQuick 2.0
+import QtGraphicalEffects 1
+
+Rectangle {
+ id:mbutton
+ property alias buttonText: textItem.text
+ width: textItem.implicitWidth + 10
+ height: textItem.implicitHeight + 10
+ color: "lightgrey"
+ radius: 5
+ signal mbuttonClicked
+ MouseArea {
+ anchors.fill: parent
+ onClicked: mbuttonClicked()
+ }
+ Text {id: textItem
+ anchors.centerIn: parent
+ }
+ }