mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 14:43:09 +00:00
fix landscape favourites bar drag and drop, and cleanup folder fix drawer scrolling add settings
53 lines
1.1 KiB
QML
53 lines
1.1 KiB
QML
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls as Controls
|
|
import QtQuick.Effects
|
|
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
import org.kde.private.mobile.homescreen.folio 1.0 as Folio
|
|
|
|
Loader {
|
|
id: root
|
|
|
|
height: Folio.FolioSettings.delegateIconSize
|
|
width: Folio.FolioSettings.delegateIconSize
|
|
|
|
property Folio.FolioDelegate delegate
|
|
|
|
sourceComponent: {
|
|
if (!delegate) {
|
|
return noIcon;
|
|
} else if (delegate.type === Folio.FolioDelegate.Application) {
|
|
return appIcon;
|
|
} else if (delegate.type === Folio.FolioDelegate.Folder) {
|
|
return folderIcon;
|
|
} else {
|
|
return noIcon;
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: noIcon
|
|
Item {}
|
|
}
|
|
|
|
Component {
|
|
id: appIcon
|
|
|
|
DelegateAppIcon {
|
|
source: delegate.application.icon
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: folderIcon
|
|
|
|
DelegateFolderIcon {
|
|
folder: delegate.folder
|
|
}
|
|
}
|
|
}
|