summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml
diff options
context:
space:
mode:
authorNippy <nippy@rp1.hu>2026-05-08 19:50:49 +0200
committerNippy <nippy@rp1.hu>2026-05-08 19:50:49 +0200
commit3462bcc46ecf74f576ea4397f16492c16bd75b10 (patch)
treec5ab7aef4498647e057bda8d49c11e5f9dda74c9 /raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml
parent56616f693b4f263cbf0d47da43b67424efa6022d (diff)
downloadRaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.tar.gz
RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.zip
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml')
-rw-r--r--raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml127
1 files changed, 127 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml b/raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml
new file mode 100644
index 0000000..a664be5
--- /dev/null
+++ b/raveos-hyprland-theme/theme-data/dms/Modals/FileBrowser/FileBrowserOverwriteDialog.qml
@@ -0,0 +1,127 @@
+import QtQuick
+import qs.Common
+import qs.Widgets
+
+Item {
+ id: overwriteDialog
+
+ property bool showDialog: false
+ property string pendingFilePath: ""
+
+ signal confirmed(string filePath)
+ signal cancelled()
+
+ visible: showDialog
+ focus: showDialog
+
+ Keys.onEscapePressed: {
+ cancelled()
+ }
+
+ Keys.onReturnPressed: {
+ confirmed(pendingFilePath)
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: Theme.shadowStrong
+ opacity: 0.8
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ cancelled()
+ }
+ }
+ }
+
+ StyledRect {
+ anchors.centerIn: parent
+ width: 400
+ height: 160
+ color: Theme.surfaceContainer
+ radius: Theme.cornerRadius
+ border.color: Theme.outlineMedium
+ border.width: 1
+
+ Column {
+ anchors.centerIn: parent
+ width: parent.width - Theme.spacingL * 2
+ spacing: Theme.spacingM
+
+ StyledText {
+ text: I18n.tr("File Already Exists")
+ font.pixelSize: Theme.fontSizeLarge
+ font.weight: Font.Medium
+ color: Theme.surfaceText
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ StyledText {
+ text: I18n.tr("A file with this name already exists. Do you want to overwrite it?")
+ font.pixelSize: Theme.fontSizeMedium
+ color: Theme.surfaceTextMedium
+ width: parent.width
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: Theme.spacingM
+
+ StyledRect {
+ width: 80
+ height: 36
+ radius: Theme.cornerRadius
+ color: cancelArea.containsMouse ? Theme.surfaceVariantHover : Theme.surfaceVariant
+ border.color: Theme.outline
+ border.width: 1
+
+ StyledText {
+ anchors.centerIn: parent
+ text: I18n.tr("Cancel")
+ font.pixelSize: Theme.fontSizeMedium
+ color: Theme.surfaceText
+ font.weight: Font.Medium
+ }
+
+ MouseArea {
+ id: cancelArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ cancelled()
+ }
+ }
+ }
+
+ StyledRect {
+ width: 90
+ height: 36
+ radius: Theme.cornerRadius
+ color: overwriteArea.containsMouse ? Qt.darker(Theme.primary, 1.1) : Theme.primary
+
+ StyledText {
+ anchors.centerIn: parent
+ text: I18n.tr("Overwrite")
+ font.pixelSize: Theme.fontSizeMedium
+ color: Theme.background
+ font.weight: Font.Medium
+ }
+
+ MouseArea {
+ id: overwriteArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ confirmed(pendingFilePath)
+ }
+ }
+ }
+ }
+ }
+ }
+}