Improved itinerary delegates

Steal the look of itinerary items from itinerary but simplified. Also includes new support for flights and restaurants

![image](/uploads/a574d2362edad52ecf91ce89a1849f27/image.png)
This commit is contained in:
James Graham
2024-03-23 09:33:51 +00:00
parent 7d4f8780ad
commit ba45318b56
61 changed files with 1156 additions and 64 deletions

View File

@@ -0,0 +1,46 @@
// SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
/**
* @brief A base component for an itinerary reservation.
*/
FormCard.FormCard {
id: root
/**
* @brief An item with the header content.
*/
property alias headerItem: headerDelegate.contentItem
/**
* @brief An item with the main body content.
*/
property alias contentItem: content.contentItem
Layout.fillWidth: true
implicitWidth: Math.max(headerDelegate.implicitWidth, content.implicitWidth)
Component.onCompleted: children[0].radius = Kirigami.Units.smallSpacing
FormCard.AbstractFormDelegate {
id: headerDelegate
Layout.fillWidth: true
background: Rectangle {
color: Kirigami.Theme.backgroundColor
Kirigami.Theme.colorSet: Kirigami.Theme.Header
Kirigami.Theme.inherit: false
}
}
FormCard.AbstractFormDelegate {
id: content
Layout.fillWidth: true
background: null
}
}