From c5381c5194adf97c240acb98eb4c4c950633b325 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 4 Aug 2025 22:45:15 +1000 Subject: internal: refactor widgets folder Split into subdirs and rename to components --- widgets/filedialog/FileDialog.qml | 106 -------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 widgets/filedialog/FileDialog.qml (limited to 'widgets/filedialog/FileDialog.qml') diff --git a/widgets/filedialog/FileDialog.qml b/widgets/filedialog/FileDialog.qml deleted file mode 100644 index a533243..0000000 --- a/widgets/filedialog/FileDialog.qml +++ /dev/null @@ -1,106 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs.services -import qs.config -import Quickshell -import QtQuick -import QtQuick.Layouts - -LazyLoader { - id: loader - - property list cwd: ["Home"] - property string filterLabel: "All files" - property list filters: ["*"] - property string title: qsTr("Select a file") - - signal accepted(path: string) - signal rejected - - function open(): void { - activeAsync = true; - } - - function close(): void { - rejected(); - } - - onAccepted: activeAsync = false - onRejected: activeAsync = false - - FloatingWindow { - id: root - - property list cwd: loader.cwd - property string filterLabel: loader.filterLabel - property list filters: loader.filters - - readonly property bool selectionValid: { - const item = folderContents.currentItem; - return item && !item.fileIsDir && (filters.includes("*") || filters.includes(item.fileSuffix)); - } - - function accepted(path: string): void { - loader.accepted(path); - } - - function rejected(): void { - loader.rejected(); - } - - implicitWidth: 1000 - implicitHeight: 600 - color: Colours.palette.m3surface - title: loader.title - - onVisibleChanged: { - if (!visible) - rejected(); - } - - RowLayout { - anchors.fill: parent - - spacing: 0 - - Sidebar { - Layout.fillHeight: true - dialog: root - } - - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true - - spacing: 0 - - HeaderBar { - Layout.fillWidth: true - dialog: root - } - - FolderContents { - id: folderContents - - Layout.fillWidth: true - Layout.fillHeight: true - dialog: root - } - - DialogButtons { - Layout.fillWidth: true - dialog: root - folder: folderContents - } - } - } - - Behavior on color { - ColorAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - } - } -} -- cgit v1.2.3-freya