Warning, /plasma/plasma-mobile/containments/homescreens/folio/package/contents/ui/delegate/DelegateIconLoader.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Layouts 0006 import QtQuick.Controls as Controls 0007 import QtQuick.Effects 0008 0009 import org.kde.kirigami 2.20 as Kirigami 0010 0011 import org.kde.private.mobile.homescreen.folio 1.0 as Folio 0012 0013 Loader { 0014 id: root 0015 0016 height: Folio.FolioSettings.delegateIconSize 0017 width: Folio.FolioSettings.delegateIconSize 0018 0019 property Folio.FolioDelegate delegate 0020 0021 sourceComponent: { 0022 if (!delegate) { 0023 return noIcon; 0024 } else if (delegate.type === Folio.FolioDelegate.Application) { 0025 return appIcon; 0026 } else if (delegate.type === Folio.FolioDelegate.Folder) { 0027 return folderIcon; 0028 } else { 0029 return noIcon; 0030 } 0031 } 0032 0033 Component { 0034 id: noIcon 0035 Item {} 0036 } 0037 0038 Component { 0039 id: appIcon 0040 0041 DelegateAppIcon { 0042 source: delegate.application.icon 0043 } 0044 } 0045 0046 Component { 0047 id: folderIcon 0048 0049 DelegateFolderIcon { 0050 folder: delegate.folder 0051 } 0052 } 0053 }