From 4ddba5f193f7cbb3af811f61681c069dc822dbaf Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Wed, 4 Sep 2019 23:12:28 +0700 Subject: add Floating Action Button --- assets/add-24px.svg | 1 + kelakon.qrc | 1 + pages/HomeForm.ui.qml | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 assets/add-24px.svg diff --git a/assets/add-24px.svg b/assets/add-24px.svg new file mode 100644 index 0000000..ff2ae4c --- /dev/null +++ b/assets/add-24px.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/kelakon.qrc b/kelakon.qrc index d6251ff..c426334 100644 --- a/kelakon.qrc +++ b/kelakon.qrc @@ -23,5 +23,6 @@ assets/menu-24px.svg assets/check-box-outline-24px.svg assets/chevron-right-24px.svg + assets/add-24px.svg diff --git a/pages/HomeForm.ui.qml b/pages/HomeForm.ui.qml index b16d95b..3cf2ad9 100644 --- a/pages/HomeForm.ui.qml +++ b/pages/HomeForm.ui.qml @@ -86,6 +86,35 @@ Rectangle { icon.color: "#99000000" } } + + RoundButton { + id: roundButton + width: 144 + spacing: 8 + height: 64 + + text: qsTr("New task") + padding: 16 + font.capitalization: Font.MixedCase + font.family: "Google Sans" + font.pointSize: 16 + font.weight: Font.Medium + + rightPadding: 24 + leftPadding: 16 + bottomPadding: 16 + topPadding: 16 + autoExclusive: false + focusPolicy: Qt.NoFocus + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + anchors.right: parent.right + anchors.rightMargin: 16 + highlighted: true + + icon.name: "add-icon" + icon.source: "/assets/add-24px.svg" + } } -- cgit v1.2.3