From fb221a9073bf4baa1048011bc6fb11aea7d24df6 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 21:25:14 +0800 Subject: Own ticket form, not larva's --- Home.qml | 3 +-- TicketForm.ui.qml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ fonts/RobotoMono-Bold.ttf | Bin 0 -> 87008 bytes kelakon.qrc | 3 ++- larva.qrc | 2 -- 5 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 TicketForm.ui.qml create mode 100644 fonts/RobotoMono-Bold.ttf diff --git a/Home.qml b/Home.qml index e6d4804..5d08e3d 100644 --- a/Home.qml +++ b/Home.qml @@ -2,7 +2,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import "larva/features" -import "larva/components" HomeForm { //menuButton.onClicked: drawer.open() @@ -17,7 +16,7 @@ HomeForm { TaskListForm { listView { model: ticketList - delegate: ListItemSingleTextForm { + delegate: TicketForm { title.text: subject delegate.onClicked: { window.ticketHistoryList(id, diff --git a/TicketForm.ui.qml b/TicketForm.ui.qml new file mode 100644 index 0000000..dd3f6c1 --- /dev/null +++ b/TicketForm.ui.qml @@ -0,0 +1,50 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +Item { + property alias title: title + property alias delegate: delegate + + width: 328 + height: 64 + + FontLoader { + id: robotoMonoBold + source: "fonts/RobotoMono-Bold.ttf" + } + + ItemDelegate { + id: delegate + anchors.fill: parent + + Image { + id: image + width: 32 + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: 16 + anchors.topMargin: 16 + anchors.bottomMargin: 16 + fillMode: Image.PreserveAspectFit + } + + Text { + id: title + width: 208 + text: qsTr("Project name") + anchors.left: image.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: 16 + anchors.topMargin: 20 + anchors.bottomMargin: 20 + lineHeight: 24 + verticalAlignment: Text.AlignVCenter + font.family: robotoMonoBold.name + font.bold: true + font.pixelSize: 16 + font.letterSpacing: 0.15 + } + } +} diff --git a/fonts/RobotoMono-Bold.ttf b/fonts/RobotoMono-Bold.ttf new file mode 100644 index 0000000..900fce6 Binary files /dev/null and b/fonts/RobotoMono-Bold.ttf differ diff --git a/kelakon.qrc b/kelakon.qrc index 8944105..774a12e 100644 --- a/kelakon.qrc +++ b/kelakon.qrc @@ -4,7 +4,7 @@ Login.qml LoginPassword.qml Home.qml - TicketList.qml + TicketForm.ui.qml TicketHistory.qml Profile.qml Email.qml @@ -20,5 +20,6 @@ square.png active-indicator.png fonts/RobotoMono-Regular.ttf + fonts/RobotoMono-Bold.ttf diff --git a/larva.qrc b/larva.qrc index 297b195..0a7e71e 100644 --- a/larva.qrc +++ b/larva.qrc @@ -1,7 +1,5 @@ - larva/components/ListItemSingleTextForm.ui.qml - larva/fonts/RobotoMono-Bold.ttf larva/features/OnboardingForm.ui.qml larva/features/LoginForm.ui.qml larva/features/LoginEmailForm.ui.qml -- cgit v1.2.3