Warning, /plasma/discover/discover/qml/GridApplicationDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 * SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org> 0004 * SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 import QtQuick 0010 import QtQuick.Controls as QQC2 0011 import QtQuick.Layouts 0012 import org.kde.discover as Discover 0013 import org.kde.kirigami as Kirigami 0014 0015 BasicAbstractCard { 0016 id: root 0017 0018 required property Discover.AbstractResource application 0019 0020 showClickFeedback: true 0021 0022 // Don't let RowLayout affect parent GridLayout's decisions, or else it 0023 // would resize cells proportionally to their label text length. 0024 implicitWidth: 0 0025 0026 content: RowLayout { 0027 anchors.fill: parent 0028 spacing: Kirigami.Units.largeSpacing 0029 0030 Kirigami.Icon { 0031 Layout.alignment: Qt.AlignVCenter 0032 Layout.margins: Kirigami.Units.largeSpacing 0033 implicitWidth: Kirigami.Units.iconSizes.huge 0034 implicitHeight: Kirigami.Units.iconSizes.huge 0035 source: root.application.icon 0036 animated: false 0037 } 0038 0039 ColumnLayout { 0040 Layout.fillWidth: true 0041 Layout.fillHeight: true 0042 spacing: 0 0043 0044 Kirigami.Heading { 0045 id: head 0046 level: 2 0047 type: Kirigami.Heading.Type.Primary 0048 Layout.fillWidth: true 0049 Layout.alignment: Qt.AlignBottom 0050 wrapMode: Text.WordWrap 0051 maximumLineCount: 2 0052 0053 text: root.application.name 0054 } 0055 0056 QQC2.Label { 0057 Layout.fillWidth: true 0058 Layout.alignment: Qt.AlignTop 0059 maximumLineCount: head.lineCount === 1 ? 3 : 2 0060 opacity: 0.6 0061 wrapMode: Text.WordWrap 0062 0063 text: root.application.comment 0064 } 0065 } 0066 } 0067 0068 onClicked: Navigation.openApplication(root.application) 0069 }