From 5d94c0a7d44a2255b81815a52a7056a94a39842d Mon Sep 17 00:00:00 2001 From: nippy Date: Sat, 18 Apr 2026 13:49:56 +0200 Subject: update Raveos themes --- .../Modals/FileBrowser/FileBrowserSaveRow.qml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSaveRow.qml (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSaveRow.qml') diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSaveRow.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSaveRow.qml new file mode 100644 index 0000000..6360c7f --- /dev/null +++ b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSaveRow.qml @@ -0,0 +1,74 @@ +import QtQuick +import qs.Common +import qs.Widgets + +Row { + id: saveRow + + property bool saveMode: false + property string defaultFileName: "" + property string currentPath: "" + + signal saveRequested(string filePath) + + height: saveMode ? 40 : 0 + visible: saveMode + spacing: Theme.spacingM + + DankTextField { + id: fileNameInput + + width: parent.width - saveButton.width - Theme.spacingM + height: 40 + text: defaultFileName + placeholderText: I18n.tr("Enter filename...") + ignoreLeftRightKeys: false + focus: saveMode + topPadding: Theme.spacingS + bottomPadding: Theme.spacingS + Component.onCompleted: { + if (saveMode) + Qt.callLater(() => { + forceActiveFocus() + }) + } + onAccepted: { + if (text.trim() !== "") { + var basePath = currentPath.replace(/^file:\/\//, '') + var fullPath = basePath + "/" + text.trim() + fullPath = fullPath.replace(/\/+/g, '/') + saveRequested(fullPath) + } + } + } + + StyledRect { + id: saveButton + + width: 80 + height: 40 + color: fileNameInput.text.trim() !== "" ? Theme.primary : Theme.surfaceVariant + radius: Theme.cornerRadius + + StyledText { + anchors.centerIn: parent + text: I18n.tr("Save") + color: fileNameInput.text.trim() !== "" ? Theme.primaryText : Theme.surfaceVariantText + font.pixelSize: Theme.fontSizeMedium + } + + StateLayer { + stateColor: Theme.primary + cornerRadius: Theme.cornerRadius + enabled: fileNameInput.text.trim() !== "" + onClicked: { + if (fileNameInput.text.trim() !== "") { + var basePath = currentPath.replace(/^file:\/\//, '') + var fullPath = basePath + "/" + fileNameInput.text.trim() + fullPath = fullPath.replace(/\/+/g, '/') + saveRequested(fullPath) + } + } + } + } +} -- cgit v1.3