mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
Use Motion wrappers and state layers across Folio and Halcyon delegates, drawers, folders, resize handles, and dock feedback. Also align Folio edit/drop highlights with theme colors instead of fixed white overlays.
48 lines
1.6 KiB
QML
48 lines
1.6 KiB
QML
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
import "./delegate"
|
|
|
|
Item {
|
|
id: root
|
|
property Folio.HomeScreen folio
|
|
readonly property color placeholderColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
|
|
width: folio.HomeScreenState.pageCellWidth
|
|
height: folio.HomeScreenState.pageCellHeight
|
|
|
|
// we need to simulate the position of the icon if it is placed at this spot
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
|
|
// icon position placement
|
|
Rectangle {
|
|
id: loader
|
|
color: root.placeholderColor
|
|
radius: Kirigami.Units.cornerRadius
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
|
Layout.minimumWidth: folio.FolioSettings.delegateIconSize
|
|
Layout.minimumHeight: folio.FolioSettings.delegateIconSize
|
|
Layout.preferredHeight: Layout.minimumHeight
|
|
layer.enabled: true
|
|
layer.effect: DelegateShadow {}
|
|
}
|
|
|
|
// simulate a delegate's label for positioning purposes
|
|
DelegateLabel {
|
|
id: label
|
|
opacity: 0
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: folio.HomeScreenState.pageDelegateLabelHeight
|
|
Layout.topMargin: folio.HomeScreenState.pageDelegateLabelSpacing
|
|
}
|
|
}
|
|
}
|