diff options
-rw-r--r-- | qml/MButton.qml | 21 | ||||
-rw-r--r-- | qml/mw-ui.qml | 13 |
2 files changed, 24 insertions, 10 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 + } + } diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 785564e..8ee195e 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -285,20 +285,13 @@ Rectangle { Layout.columnSpan: 2 Layout.margins: 10 } - Button { + MButton { Layout.maximumWidth: slideshow.width * .40 Layout.columnSpan: 2 Layout.alignment: Qt.AlignHCenter objectName: "launch" - onClicked: { launch.command(["drakrpm-edit-media",])} - style: ButtonStyle { - label: Label { - text: qsTr("Edit software sources")+" *"; - width: parent.width - wrapMode: Text.WordWrap - color: "black" - } - } + onMbuttonClicked: { launch.command(["drakrpm-edit-media",])} + buttonText: qsTr("Edit software sources")+" *" } } |