'Positions the file switcher dialog.'

def set_dialog_position(self):

    parent = self.parent()
    geo = parent.geometry()
    width = self.list.width()
    left = ((parent.geometry().width() / 2) - (width / 2))
    if isinstance(parent, QMainWindow):
        top = ((parent.toolbars_menu.geometry().height() + parent.menuBar().geometry().height()) + 1)
    else:
        top = (self.plugins_tabs[0][0].tabBar().geometry().height() + 1)
    while parent:
        geo = parent.geometry()
        top += geo.top()
        left += geo.left()
        parent = parent.parent()
    self.move(left, top)
