2019-03-31 17:24:25 -07:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
|
|
Dialog {
|
2020-12-01 20:46:28 -06:00
|
|
|
// We should use Overlay.overlay here but that's not available in Qt 5.9 :(
|
|
|
|
parent: ApplicationWindow.contentItem
|
2019-03-31 17:44:19 -07:00
|
|
|
|
|
|
|
x: Math.round((parent.width - width) / 2)
|
|
|
|
y: Math.round((parent.height - height) / 2)
|
2019-03-31 17:24:25 -07:00
|
|
|
|
2019-03-31 19:32:17 -07:00
|
|
|
onAboutToHide: {
|
2019-03-31 17:24:25 -07:00
|
|
|
// We must force focus back to the last item for platforms without
|
|
|
|
// support for more than one active window like Steam Link. If
|
|
|
|
// we don't, gamepad and keyboard navigation will break after a
|
|
|
|
// dialog appears.
|
2019-03-31 19:32:17 -07:00
|
|
|
stackView.forceActiveFocus()
|
2019-03-31 17:24:25 -07:00
|
|
|
}
|
|
|
|
}
|