From a00c1d53cc9460f3f50be7f8a1092b9350f6aea2 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: Tue, 25 Jan 2022 11:12:28 +0800 Subject: Interface to ItemDelegate so it can be clicked --- components/ListItemSingleTextForm.ui.qml | 66 +++++++++++++++++--------------- 1 file changed, 36 insertions(+), 30 deletions(-) (limited to 'components') diff --git a/components/ListItemSingleTextForm.ui.qml b/components/ListItemSingleTextForm.ui.qml index 7bcfe02..fcd6005 100644 --- a/components/ListItemSingleTextForm.ui.qml +++ b/components/ListItemSingleTextForm.ui.qml @@ -3,41 +3,47 @@ import QtQuick.Controls 2.15 Item { property alias title: title + property alias delegate: delegate width: 328 height: 64 - 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 - } + ItemDelegate { + id: delegate + anchors.fill: parent - FontLoader { - id: robotoMonoBold - source: "../fonts/RobotoMono-Bold.ttf" - } + 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 + } + + FontLoader { + id: robotoMonoBold + source: "../fonts/RobotoMono-Bold.ttf" + } - 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.pixelSize: 16 - font.letterSpacing: 0.15 + 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.pixelSize: 16 + font.letterSpacing: 0.15 + } } } -- cgit v1.2.3