diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-02 23:13:09 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-02 23:13:09 +1000 |
| commit | 587760810cd22e57168caf369da6e6488ad6023a (patch) | |
| tree | d12575bd4651592163957098a7f201c54c9dcc51 /modules/launcher/EmptyIndicator.qml | |
| parent | launcher: auto grab focus + clear on close (diff) | |
| download | caelestia-shell-587760810cd22e57168caf369da6e6488ad6023a.tar.gz caelestia-shell-587760810cd22e57168caf369da6e6488ad6023a.tar.bz2 caelestia-shell-587760810cd22e57168caf369da6e6488ad6023a.zip | |
feat: launcher empty placeholder
Diffstat (limited to 'modules/launcher/EmptyIndicator.qml')
| -rw-r--r-- | modules/launcher/EmptyIndicator.qml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/launcher/EmptyIndicator.qml b/modules/launcher/EmptyIndicator.qml new file mode 100644 index 0000000..9593a2e --- /dev/null +++ b/modules/launcher/EmptyIndicator.qml @@ -0,0 +1,62 @@ +import "root:/widgets" +import "root:/config" +import QtQuick + +Loader { + id: root + + required property bool empty + + active: false + opacity: 0 + scale: 0 + asynchronous: true + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + sourceComponent: Item { + implicitWidth: childrenRect.width + implicitHeight: icon.height + + MaterialIcon { + id: icon + + text: "manage_search" + color: Appearance.colours.m3outline + font.pointSize: Appearance.font.size.extraLarge + + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + anchors.left: icon.right + anchors.leftMargin: Appearance.spacing.small + anchors.verticalCenter: icon.verticalCenter + + text: qsTr("No matching apps found") + color: Appearance.colours.m3outline + font.pointSize: Appearance.font.size.larger + font.weight: 500 + } + } + + states: State { + name: "visible" + when: root.empty + + PropertyChanges { + root.active: true + root.opacity: 1 + root.scale: 1 + } + } + + transitions: Transition { + NumberAnimation { + properties: "opacity,scale" + duration: Appearance.anim.durations.large + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } + } +} |