@@ -529,8 +529,10 @@ Window {
529529
530530 highlighted: fileListView .currentIndex == - 1 ? isCurrentItemSelected () : ListView .isCurrentItem
531531
532+
532533 // Enable drag for folders
533- Drag .active : model .fileIsDir && dragArea .drag .active
534+ property bool isDragging: false
535+ Drag .active : isDragging
534536 Drag .dragType : Drag .Automatic
535537 Drag .supportedActions : Qt .CopyAction
536538 Drag .mimeData : { " text/uri-list" : model .fileURL .toString () }
@@ -574,10 +576,19 @@ Window {
574576 }
575577
576578 MouseArea {
577- id: dragArea
578579 anchors .fill : parent
579580 drag .target : model .fileIsDir ? parent : null
580-
581+
582+ onPressed: {
583+ if (model .fileIsDir ) {
584+ parent .isDragging = true
585+ }
586+ }
587+
588+ onReleased: {
589+ parent .isDragging = false
590+ }
591+
581592 onClicked: {
582593 fileListView .currentIndex = model .index
583594 if (model .fileIsDir ) {
@@ -619,7 +630,9 @@ Window {
619630
620631 function selectedPathExists () {
621632 return Filepath .exists (getSelectedPath ())
622- }
633+ }
634+
635+ property color fileExistsColor: _PaletteManager .isDarkPalette () ? Qt .darker (Colors .red , 2 ) : Qt .lighter (Colors .red , 1.5 )
623636
624637 RowLayout {
625638 anchors .fill : parent
@@ -629,7 +642,7 @@ Window {
629642 Rectangle {
630643 Layout .fillWidth : true
631644 height: filenameField .implicitHeight
632- color: selectionBar .selectedPathExists () ? Qt . darker ( Colors . red , 2 ) : root .activePalette .base
645+ color: selectionBar .selectedPathExists () ? selectionBar . fileExistsColor : root .activePalette .base
633646 border .color : filenameField .activeFocus ? root .activePalette .accent : Qt .darker (root .activePalette .base , 1.4 )
634647 border .width : 1
635648 radius: 5
0 commit comments