From 5df5faf5cae1f2d5c889ef51237051fb5d35ece8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 5 Feb 2022 20:54:59 +0800 Subject: Home tab bar as designed --- MainTabBarForm.ui.qml | 84 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 19 deletions(-) (limited to 'MainTabBarForm.ui.qml') diff --git a/MainTabBarForm.ui.qml b/MainTabBarForm.ui.qml index 1e216ac..6a53398 100644 --- a/MainTabBarForm.ui.qml +++ b/MainTabBarForm.ui.qml @@ -1,38 +1,84 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 -TabBar { +Rectangle { property alias leftTabButton: leftTabButton property alias middleTabButton: middleTabButton property alias rightTabButton: rightTabButton - id: tabBar + color: "#fcfcfc" width: 360 + height: 80 - TabButton { - id: leftTabButton + FontLoader { + id: robotoMono + source: "fonts/RobotoMono-Regular.ttf" + } + + TabBar { + anchors.fill: parent + + TabButton { + id: leftTabButton + height: parent.height + anchors.verticalCenter: parent.verticalCenter + + Image { + source: "circle.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 22 + } - Image { - anchors.centerIn: parent + Text { + text: qsTr("Today") + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + font.family: robotoMono.name + } } - } - TabButton { - id: middleTabButton - x: tabBar.width / 3 + TabButton { + id: middleTabButton + height: parent.height + anchors.verticalCenter: parent.verticalCenter + + Image { + source: "triangle.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 22 + } - Image { - anchors.centerIn: parent - source: "active-indicator.png" + Text { + text: qsTr("Projects") + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + font.family: robotoMono.name + } } - } - TabButton { - id: rightTabButton - x: tabBar.width * 2 / 3 + TabButton { + id: rightTabButton + height: parent.height + anchors.verticalCenter: parent.verticalCenter + + Image { + source: "square.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 22 + } - Image { - anchors.centerIn: parent + Text { + text: qsTr("Label") + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + font.family: robotoMono.name + } } } } -- cgit v1.2.3