summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anata@darapsa.co.id>2020-12-07 12:30:40 +0700
committerAnatasof Wirapraja <anata@darapsa.co.id>2020-12-07 12:30:40 +0700
commit082a0c44d77991c1366edf1ebe6650c7102e1c4f (patch)
treeca75361ee16092f362a31d2cd76ff40c18b78c8f
parentc35b90e20259b61672f7a35e089b46c07b038d67 (diff)
use contentView text instead of toolbar text as page title
-rw-r--r--pages/HomeForm.ui.qml30
1 files changed, 17 insertions, 13 deletions
diff --git a/pages/HomeForm.ui.qml b/pages/HomeForm.ui.qml
index 02c502d..f896064 100644
--- a/pages/HomeForm.ui.qml
+++ b/pages/HomeForm.ui.qml
@@ -3,6 +3,9 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.12
Page {
+ id: page
+ title: qsTr("Today")
+
property alias menuButton: menuButton
property alias profileButton: profileButton
property alias contentView: contentView
@@ -20,20 +23,9 @@ Page {
icon.source: "../icons/menu-24px.svg"
highlighted: true
}
- Label {
- text: "Today"
- 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
+ Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
icon.name: "profile-button"
icon.source: "../icons/profile-24px.svg"
highlighted: true
@@ -44,11 +36,23 @@ Page {
StackView {
id: contentView
anchors.fill: parent
+
+ Text {
+ id: pageTitle
+ text: contentView.currentItem.title
+ anchors.left: parent.left
+ anchors.top: parent.top
+ font.pixelSize: 20
+ anchors.leftMargin: 16
+ anchors.topMargin: 16
+ font.weight: Font.Medium
+ font.family: "Roboto Mono"
+ }
}
}
/*##^##
Designer {
- D{i:0;autoSize:true;height:480;width:640}
+ D{i:0;autoSize:true;height:480;width:640}D{i:7}
}
##^##*/