diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-20 15:01:49 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-20 15:01:49 +1000 |
| commit | 50d62ece241c661ebeab77e1ec49ec767090d4f6 (patch) | |
| tree | c00ba047c85796e3139a6de846f130b4f52d7257 /widgets/filedialog/FolderContents.qml | |
| parent | filedialog: add special icons for xdg dirs (diff) | |
| download | caelestia-shell-50d62ece241c661ebeab77e1ec49ec767090d4f6.tar.gz caelestia-shell-50d62ece241c661ebeab77e1ec49ec767090d4f6.tar.bz2 caelestia-shell-50d62ece241c661ebeab77e1ec49ec767090d4f6.zip | |
filedialog: add empty text
Diffstat (limited to '')
| -rw-r--r-- | widgets/filedialog/FolderContents.qml | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/widgets/filedialog/FolderContents.qml b/widgets/filedialog/FolderContents.qml index bc4d6dc..82ed2bc 100644 --- a/widgets/filedialog/FolderContents.qml +++ b/widgets/filedialog/FolderContents.qml @@ -8,6 +8,7 @@ import Quickshell import Quickshell.Io import Quickshell.Widgets import QtQuick +import QtQuick.Layouts import QtQuick.Effects import Qt.labs.folderlistmodel @@ -44,6 +45,28 @@ Item { } } + Loader { + anchors.centerIn: parent + active: view.count === 0 + asynchronous: true + sourceComponent: ColumnLayout { + MaterialIcon { + Layout.alignment: Qt.AlignHCenter + text: "scan_delete" + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.extraLarge * 2 + font.weight: 500 + } + + StyledText { + text: qsTr("This folder is empty") + color: Colours.palette.m3outline + font.pointSize: Appearance.font.size.large + font.weight: 500 + } + } + } + GridView { id: view @@ -166,12 +189,23 @@ Item { } Behavior on implicitHeight { - NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } + Anim {} + } + } + + populate: Transition { + Anim { + property: "scale" + from: 0.7 + to: 1 + easing.bezierCurve: Appearance.anim.curves.standardDecel } } } + + component Anim: NumberAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } } |