diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index b043aef3bee1dbcd26626c7563f1f924eb84b3ca..b4624a894f2b2131f87c5b54ebfb4437613c8c94 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -272,62 +272,64 @@ Kirigami.ApplicationWindow { router.pushRoute({"route": "addrecord", "data": serviceId}); } } - /*Layouts.ColumnLayout { - anchors.fill: parent - Kirigami.InlineMessage { + ListView { + id: serviceView + Layouts.Layout.fillHeight: true Layouts.Layout.fillWidth: true - Layouts.Layout.leftMargin: 10 - Layouts.Layout.rightMargin: 10 - z: 9997 - type: Kirigami.MessageType.Information - id: oilMessage - showCloseButton: false - Component.onCompleted: { - //TODO: check if oil change is needed. + model: recordModel + headerPositioning: ListView.OverlayHeader + header: Kirigami.ListSectionHeader { + z: 9997 + contentItem: Layouts.ColumnLayout { + Kirigami.InlineMessage { + Layouts.Layout.fillWidth: true + type: Kirigami.MessageType.Information + id: oilMessage + showCloseButton: false + Component.onCompleted: { + //TODO: check if oil change is needed. + } + } + } } - }*/ - ListView { - id: serviceView - model: recordModel - delegate: Kirigami.SwipeListItem { - contentItem: Layouts.ColumnLayout { - Kirigami.Heading { - text: serviceprovider - level: 2 - } - Kirigami.Heading { - text: servicetypename - level: 2 - } - Controls.Label { - text: new Date(servicedate).toLocaleDateString(Qt.locale()) - } - Row { - Image { - source: "qrc:/speed.svg" - sourceSize.width: 16 - sourceSize.height: 16 - } - Controls.Label { - text: miles - } + delegate: Kirigami.SwipeListItem { + contentItem: Layouts.ColumnLayout { + Kirigami.Heading { + text: serviceprovider + level: 2 + } + Kirigami.Heading { + text: servicetypename + level: 2 + } + Controls.Label { + text: new Date(servicedate).toLocaleDateString(Qt.locale()) + } + Row { + Image { + source: "qrc:/speed.svg" + sourceSize.width: 16 + sourceSize.height: 16 } Controls.Label { - text: notes + text: miles } } - actions: [ - Kirigami.Action { - text: qsTr("Remove") - iconName: "edit-delete" - onTriggered: { - recordModel.removeRecord(index); - } - } - ] + Controls.Label { + text: notes + } } - } - //} + actions: [ + Kirigami.Action { + text: qsTr("Remove") + iconName: "edit-delete" + onTriggered: { + recordModel.removeRecord(index); + } + } + ] + } + } } } }