From 634c5ed555b4257222942749c4803e10b41054c9 Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Sun, 22 Sep 2019 18:21:58 +0700 Subject: FAB now. moved to `TaskListForm` --- Home.qml | 2 - forms/HomeForm.ui.qml | 101 +++++++++++++++++++++------------------------- forms/TaskListForm.ui.qml | 56 ++++++++++++++++--------- 3 files changed, 83 insertions(+), 76 deletions(-) diff --git a/Home.qml b/Home.qml index 6c0ff5d..d99a091 100644 --- a/Home.qml +++ b/Home.qml @@ -15,8 +15,6 @@ HomeForm { onClicked: pageView.push("Profile.qml") } - roundButton.icon.source: "/assets/add-24px.svg" - Drawer { id: drawer width: window.width * 0.8 diff --git a/forms/HomeForm.ui.qml b/forms/HomeForm.ui.qml index 0eb77f0..c44aac5 100644 --- a/forms/HomeForm.ui.qml +++ b/forms/HomeForm.ui.qml @@ -4,61 +4,52 @@ import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.12 Page { - property alias menuButton: menuButton - property alias titleLabel: titleLabel - property alias profileButton: profileButton - property alias roundButton: roundButton - property alias contentView: contentView + property alias menuButton: menuButton + property alias titleLabel: titleLabel + property alias profileButton: profileButton + property alias contentView: contentView - header: ToolBar { - background: Rectangle { - color: "#FAFFFFFF" - } - RowLayout { - anchors.fill: parent - spacing: 0 - ToolButton { - id: menuButton - icon.name: "menu-button" - highlighted: true - } - Label { - id: titleLabel - Layout.leftMargin: 16 - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - wrapMode: Text.WordWrap - font.family: "Work Sans" - font.weight: Font.Medium - font.pointSize: 20 - color: "#000000" - Layout.fillWidth: true - } - ToolButton { - id: profileButton - icon.name: "profile-button" - highlighted: true - } - } - } - footer: RowLayout { - RoundButton { - id: roundButton - width: 64 - height: 64 - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.minimumHeight: 64 - Layout.minimumWidth: 64 - display: AbstractButton.IconOnly - spacing: 8 - padding: 16 - highlighted: true - icon.name: "add-icon" - } - } + header: ToolBar { + background: Rectangle { + color: "#FAFFFFFF" + } + RowLayout { + anchors.fill: parent + spacing: 0 + ToolButton { + id: menuButton + icon.name: "menu-button" + highlighted: true + } + Label { + id: titleLabel + Layout.leftMargin: 16 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + wrapMode: Text.WordWrap + font.family: "Work Sans" + font.weight: Font.Medium + font.pointSize: 20 + color: "#000000" + Layout.fillWidth: true + } + ToolButton { + id: profileButton + icon.name: "profile-button" + highlighted: true + } + } + } - StackView { - id: contentView - anchors.fill: parent - } + StackView { + id: contentView + anchors.fill: parent + } } + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ + diff --git a/forms/TaskListForm.ui.qml b/forms/TaskListForm.ui.qml index ebe976a..0016bb8 100644 --- a/forms/TaskListForm.ui.qml +++ b/forms/TaskListForm.ui.qml @@ -1,28 +1,46 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 +import QtQuick.Layouts 1.12 Page { - id: page - property alias listView: listView + id: page + property alias listView: listView - ListView { - id: listView - width: 362 - height: parent.height - anchors.topMargin: 8 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - spacing: 12 + ListView { + id: listView + width: parent.width + height: parent.height + anchors.topMargin: 8 + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + spacing: 12 - Rectangle { - id: rectangle - anchors.fill: parent - z: -1 - } + Rectangle { + id: rectangle + anchors.fill: parent + z: -1 + } - ScrollBar.vertical: ScrollBar {} - } + ScrollBar.vertical: ScrollBar {} + } + RoundButton { + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.right: parent.right + anchors.rightMargin: 8 + highlighted: true + icon.source: "../assets/add-24px.svg" + height: 64 + width: 64 + } } + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ + -- cgit v1.2.3