2019-04-01 00:24:25 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
|
|
Dialog {
|
2020-12-02 02:46:28 +00:00
|
|
|
// We should use Overlay.overlay here but that's not available in Qt 5.9 :(
|
|
|
|
parent: ApplicationWindow.contentItem
|
2019-04-01 00:44:19 +00:00
|
|
|
|
|
|
|
x: Math.round((parent.width - width) / 2)
|
|
|
|
y: Math.round((parent.height - height) / 2)
|
2019-04-01 00:24:25 +00:00
|
|
|
|
2019-04-01 02:32:17 +00:00
|
|
|
onAboutToHide: {
|
2019-04-01 00:24:25 +00: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-04-01 02:32:17 +00:00
|
|
|
stackView.forceActiveFocus()
|
2019-04-01 00:24:25 +00:00
|
|
|
}
|
|
|
|
}
|