mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-09 21:57:37 +03:00
tasks:improve Previews dragging file from outside
This commit is contained in:
parent
00127f28c0
commit
816466c7a4
@ -552,7 +552,7 @@ Item {
|
||||
}
|
||||
|
||||
function hide(debug){
|
||||
// console.log("on hide previews event called: "+debug);
|
||||
//console.log(" Tasks: hide previews event called: "+debug);
|
||||
if (containsMouse || !visible) {
|
||||
return;
|
||||
}
|
||||
@ -610,8 +610,14 @@ Item {
|
||||
onTriggered: {
|
||||
//! Orchestrate restore zoom and previews window hiding. Both should be
|
||||
//! triggered together.
|
||||
if (!windowsPreviewDlg.containsMouse
|
||||
&& !(windowsPreviewDlg.activeItem && windowsPreviewDlg.activeItem.containsMouse)) {
|
||||
var contains = (windowsPreviewDlg.containsMouse
|
||||
|| (windowsPreviewDlg.activeItem && windowsPreviewDlg.activeItem.containsMouse) /*main task*/
|
||||
|| (windowsPreviewDlg.activeItem /*dragging file(s) from outside*/
|
||||
&& mouseHandler.hoveredItem
|
||||
&& !root.dragSource
|
||||
&& mouseHandler.hoveredItem === windowsPreviewDlg.activeItem));
|
||||
|
||||
if (!contains) {
|
||||
windowsPreviewDlg.visible = false;
|
||||
windowsPreviewDlg.mainItem.visible = false;
|
||||
windowsPreviewDlg.activeItem = null;
|
||||
|
@ -96,7 +96,7 @@ PlasmaExtras.ScrollArea {
|
||||
property QtObject currentWindow
|
||||
|
||||
onDragLeave: {
|
||||
windowsPreviewDlg.hide();
|
||||
windowsPreviewDlg.hide(9.9);
|
||||
}
|
||||
|
||||
onDragMove: {
|
||||
|
@ -52,7 +52,8 @@ MouseArea {
|
||||
|
||||
if (!keepVisibility) {
|
||||
icList.hoveredIndex = -1;
|
||||
windowsPreviewDlg.hide("7.1");
|
||||
windowsPreviewDlg.visible = false;
|
||||
startCheckRestoreZoomTimer();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,12 @@ Item {
|
||||
return ((event.mimeData.formats.indexOf("text/x-plasmoidservicename") === 0) && isSeparator);
|
||||
}
|
||||
|
||||
onHoveredItemChanged: {
|
||||
if (hoveredItem && windowsPreviewDlg.activeItem && hoveredItem !== windowsPreviewDlg.activeItem ) {
|
||||
windowsPreviewDlg.hide(6.7);
|
||||
}
|
||||
}
|
||||
|
||||
onDragEnter:{
|
||||
dArea.containsDrag = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user