Files
amnezia-client/client/ui/qml/Components/BenefitsPanel.qml
T

41 lines
811 B
QML
Raw Normal View History

2026-03-25 23:57:52 +08:00
import QtQuick
import QtQuick.Layouts
import "."
import Style 1.0
Rectangle {
id: root
property var benefitsModel: null
2026-03-25 23:57:52 +08:00
visible: benefitsModel && benefitsModel.rowCount() > 0
2026-03-26 14:17:54 +08:00
2026-03-25 23:57:52 +08:00
radius: 16
color: AmneziaStyle.color.benefitsPanelBackground
2026-03-25 23:57:52 +08:00
implicitHeight: inner.implicitHeight + 24
ColumnLayout {
id: inner
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 12
spacing: 20
Repeater {
model: benefitsModel
2026-03-25 23:57:52 +08:00
delegate: BenefitRow {
Layout.fillWidth: true
iconSource: model.icon
titleText: model.title
bodyText: model.body
accent: !!model.accent
2026-03-25 23:57:52 +08:00
}
}
}
}