Siplyfy code.

This commit is contained in:
Hannah von Reth 2015-09-28 12:23:54 +02:00
parent 57f117da29
commit 7f041cf95e

View File

@ -30,11 +30,10 @@ Rectangle {
// item is hid during a drag event. // item is hid during a drag event.
if(Drag.active){ if(Drag.active){
window.x += x window.x += x
if(window.visible && Math.abs((window.isOrientatedLeft? if(Math.abs((window.isOrientatedLeft?
window.x - window.animationTo: window.x - window.animationTo:
window.x - window.animationFrom) + mouseAreaAccept.mouseX) <= width * 0.05){ window.x - window.animationFrom) + mouseAreaAccept.mouseX) <= width * 0.05){
Drag.cancel() Drag.cancel()
window.visible = false
window.dismissed() window.dismissed()
} }
} else { } else {