diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 22:45:15 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 22:45:15 +1000 |
| commit | c5381c5194adf97c240acb98eb4c4c950633b325 (patch) | |
| tree | 52b18eb1771ec6708c86f11d786684f03b8a7c48 /widgets/filedialog/DialogButtons.qml | |
| parent | dashboard: display correct temp units (diff) | |
| download | caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.tar.gz caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.tar.bz2 caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.zip | |
internal: refactor widgets folder
Split into subdirs and rename to components
Diffstat (limited to 'widgets/filedialog/DialogButtons.qml')
| -rw-r--r-- | widgets/filedialog/DialogButtons.qml | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/widgets/filedialog/DialogButtons.qml b/widgets/filedialog/DialogButtons.qml deleted file mode 100644 index a64195a..0000000 --- a/widgets/filedialog/DialogButtons.qml +++ /dev/null @@ -1,93 +0,0 @@ -import ".." -import qs.services -import qs.config -import QtQuick.Layouts - -StyledRect { - id: root - - required property var dialog - required property FolderContents folder - - implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2 - - color: Colours.palette.m3surfaceContainer - - RowLayout { - id: inner - - anchors.fill: parent - anchors.margins: Appearance.padding.normal - - spacing: Appearance.spacing.small - - StyledText { - text: qsTr("Filter:") - } - - StyledRect { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.rightMargin: Appearance.spacing.normal - - color: Colours.palette.m3surfaceContainerHigh - radius: Appearance.rounding.small - - StyledText { - anchors.fill: parent - anchors.margins: Appearance.padding.normal - - text: `${root.dialog.filterLabel} (${root.dialog.filters.map(f => `*.${f}`).join(", ")})` - } - } - - StyledRect { - color: Colours.palette.m3surfaceContainerHigh - radius: Appearance.rounding.small - - implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2 - implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2 - - StateLayer { - disabled: !root.dialog.selectionValid - - function onClicked(): void { - root.dialog.accepted(root.folder.currentItem.filePath); - } - } - - StyledText { - id: selectText - - anchors.centerIn: parent - anchors.margins: Appearance.padding.normal - - text: qsTr("Select") - color: root.dialog.selectionValid ? Colours.palette.m3onSurface : Colours.palette.m3outline - } - } - - StyledRect { - color: Colours.palette.m3surfaceContainerHigh - radius: Appearance.rounding.small - - implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2 - implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2 - - StateLayer { - function onClicked(): void { - root.dialog.rejected(); - } - } - - StyledText { - id: cancelText - - anchors.centerIn: parent - anchors.margins: Appearance.padding.normal - - text: qsTr("Cancel") - } - } - } -} |