Warning, /plasma/plasma-sdk/themeexplorer/package/contents/ui/delegates/listitem.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
0003 *
0004 * SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.0
0008 import QtQuick.Layouts 1.1
0009
0010 import org.kde.ksvg 1.0 as KSvg
0011 import org.kde.plasma.components 3.0 as PlasmaComponents
0012
0013 Item {
0014 Item {
0015 id: background
0016 anchors {
0017 fill: parent
0018 margins: units.gridUnit
0019 }
0020 clip: true
0021
0022 Column {
0023 anchors {
0024 fill: parent
0025 bottomMargin: label.top
0026 }
0027 Repeater {
0028 model: 5
0029 KSvg.FrameSvgItem {
0030 width: background.width
0031 height: units.gridUnit * 3
0032 imagePath: "widgets/listitem"
0033 prefix: modelData == 0 ? "section" : (modelData == 1 ? "pressed" : "normal")
0034
0035 Rectangle {
0036 id: marginsRectangle
0037 anchors {
0038 fill: parent
0039 leftMargin: parent.margins.left
0040 topMargin: parent.margins.top
0041 rightMargin: parent.margins.right
0042 bottomMargin: parent.margins.bottom
0043 }
0044 color: "green"
0045 opacity: 0.5
0046 visible: root.showMargins
0047 }
0048 PlasmaComponents.Label {
0049 anchors.centerIn: parent
0050 text: parent.prefix
0051 }
0052 KSvg.SvgItem {
0053 imagePath: "widgets/listitem"
0054 elementId: "separator"
0055 height: naturalSize.height
0056 anchors {
0057 left: parent.left
0058 right: parent.right
0059 top: parent.bottom
0060 }
0061 }
0062 }
0063 }
0064 }
0065 }
0066
0067 PlasmaComponents.Label {
0068 id: label
0069 anchors {
0070 horizontalCenter: parent.horizontalCenter
0071 bottom: parent.bottom
0072 }
0073 text: model.imagePath
0074 visible: width < marginsRectangle.width
0075 }
0076 }