Fix calculation of distance between dialog and parent applet
ParentRect is not using the same coordinate system as dialogPos and avail, which could result in incorrect placement of dialogs when you have e.g. multiple monitors or a non-maximized panel. This replaces ParentRect with dialogPos
Edited by Niccolò Venerandi