fixing bug drag highlight doesn't disappear after canceling drag

This commit is contained in:
Chris Cochrun 2022-11-30 11:25:12 -06:00
parent 97d26278cb
commit 37c7038f6f
3 changed files with 9 additions and 3 deletions

View file

@ -253,12 +253,13 @@ Item {
dragItemFontSize = fontSize; dragItemFontSize = fontSize;
draggedLibraryItem = self; draggedLibraryItem = self;
} else { } else {
songListItem.Drag.drop() songListItem.Drag.drop();
dragHighlightLine.visible = false;
} }
} }
filterChildren: true filterChildren: true
threshold: 10 threshold: 10
/* onDropped: songDropped = true; */ /* onDropped: dragHighlightLine.visible = false; */
} }
MouseArea { MouseArea {
id: songClickHandler id: songClickHandler
@ -555,6 +556,7 @@ Item {
dragItemBackground = filePath; dragItemBackground = filePath;
} else { } else {
videoListItem.Drag.drop() videoListItem.Drag.drop()
dragHighlightLine.visible = false;
} }
} }
filterChildren: true filterChildren: true
@ -837,6 +839,7 @@ Item {
dragItemBackground = filePath; dragItemBackground = filePath;
} else { } else {
imageListItem.Drag.drop() imageListItem.Drag.drop()
dragHighlightLine.visible = false;
} }
} }
filterChildren: true filterChildren: true
@ -1118,6 +1121,7 @@ Item {
dragItemBackground = filePath; dragItemBackground = filePath;
} else { } else {
presListItem.Drag.drop() presListItem.Drag.drop()
dragHighlightLine.visible = false;
} }
} }
filterChildren: true filterChildren: true

View file

@ -44,6 +44,8 @@ Controls.Page {
property var currentWindow: presentation property var currentWindow: presentation
property var dragHighlightLine
Component.onCompleted: { Component.onCompleted: {
changeServiceItem(0); changeServiceItem(0);
presentation.forceActiveFocus(); presentation.forceActiveFocus();

View file

@ -366,7 +366,7 @@ Item {
height: 4 height: 4
color: Kirigami.Theme.hoverColor color: Kirigami.Theme.hoverColor
visible: false visible: false
Component.onCompleted: dragHighlightLine = dropHighlightLine
} }
Canvas { Canvas {
/* asynchronous: true; */ /* asynchronous: true; */