Warning, /plasma/plasma-systemmonitor/src/table/FirstCellDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 import QtQuick 0008 import QtQuick.Controls 0009 import QtQuick.Layouts 0010 import QtQml.Models 0011 0012 import org.kde.kirigami as Kirigami 0013 0014 BaseCellDelegate { 0015 id: delegate 0016 0017 property string iconName 0018 0019 property real iconSize: Kirigami.Units.iconSizes.smallMedium 0020 0021 property bool treeDecorationVisible: false 0022 Binding { 0023 delegate.isTreeNode: treeDecorationVisible 0024 } 0025 onIsTreeNodeChanged: delegate.isTreeNode = Qt.binding(() => treeDecorationVisible) 0026 0027 leftMargin: Kirigami.Units.largeSpacing 0028 0029 contentItem: RowLayout { 0030 id: row 0031 Kirigami.Icon { 0032 Layout.preferredWidth: delegate.iconSize 0033 Layout.preferredHeight: Layout.preferredWidth 0034 source: delegate.iconName 0035 fallback: "" 0036 animated: false 0037 } 0038 Label { 0039 id: label 0040 Layout.fillWidth: true 0041 Layout.fillHeight: true 0042 text: delegate.text 0043 horizontalAlignment: Text.AlignLeft 0044 elide: Text.ElideRight 0045 } 0046 } 0047 0048 hoverEnabled: true 0049 }