diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-19 23:04:32 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-19 23:04:32 +1000 |
| commit | 2c8f76ba09c92f1703ecfd813efe6ef1340850b2 (patch) | |
| tree | 26c6ebd85ee2cbf4aab10472809c05766833f0dd /widgets/filedialog/HeaderBar.qml | |
| parent | internal: file dialog part 1 (diff) | |
| download | caelestia-shell-2c8f76ba09c92f1703ecfd813efe6ef1340850b2.tar.gz caelestia-shell-2c8f76ba09c92f1703ecfd813efe6ef1340850b2.tar.bz2 caelestia-shell-2c8f76ba09c92f1703ecfd813efe6ef1340850b2.zip | |
filedialog: navigation
Diffstat (limited to '')
| -rw-r--r-- | widgets/filedialog/HeaderBar.qml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/widgets/filedialog/HeaderBar.qml b/widgets/filedialog/HeaderBar.qml index 40177a3..077bd29 100644 --- a/widgets/filedialog/HeaderBar.qml +++ b/widgets/filedialog/HeaderBar.qml @@ -9,7 +9,7 @@ import QtQuick.Layouts RowLayout { id: root - required property list<string> cwd + required property var dialog spacing: Appearance.spacing.small @@ -21,7 +21,7 @@ RowLayout { radius: Appearance.rounding.small function onClicked(): void { - root.cwd.pop(); + root.dialog.cwd.pop(); } } @@ -51,7 +51,7 @@ RowLayout { spacing: Appearance.spacing.small Repeater { - model: root.cwd + model: root.dialog.cwd RowLayout { id: folder @@ -78,13 +78,13 @@ RowLayout { Loader { anchors.fill: parent - active: folder.index < root.cwd.length - 1 + active: folder.index < root.dialog.cwd.length - 1 asynchronous: true sourceComponent: StateLayer { radius: Appearance.rounding.small function onClicked(): void { - root.cwd = root.cwd.slice(0, folder.index); + root.dialog.cwd = root.dialog.cwd.slice(0, folder.index + 1); } } } @@ -100,7 +100,7 @@ RowLayout { asynchronous: true sourceComponent: MaterialIcon { text: "home" - color: root.cwd.length === 1 ? Colours.palette.m3onSurface : Colours.palette.m3onSurfaceVariant + color: root.dialog.cwd.length === 1 ? Colours.palette.m3onSurface : Colours.palette.m3onSurfaceVariant fill: 1 } } @@ -113,7 +113,7 @@ RowLayout { anchors.leftMargin: homeIcon.active ? Appearance.padding.small : 0 text: folder.modelData - color: folder.index < root.cwd.length - 1 ? Colours.palette.m3onSurfaceVariant : Colours.palette.m3onSurface + color: folder.index < root.dialog.cwd.length - 1 ? Colours.palette.m3onSurfaceVariant : Colours.palette.m3onSurface font.bold: true } } |