Do not use saved position if it falls outside of primary screen

- Only use saved position if the coordinates fall inside of the primary screen
  Prevents problems for people with laptops that sometimes but not always use
  external screens.
- Since we now set window position in C++ instead of QML, drop the
  dependency on qml-module-qt-labs-settings module.

Closes #91
This commit is contained in:
Floris Bos 2020-07-21 16:10:43 +02:00
parent 65c6377052
commit c08887f788
4 changed files with 45 additions and 11 deletions

View file

@ -8,7 +8,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.0
import QtQuick.Controls.Material 2.2
import Qt.labs.settings 1.0
ApplicationWindow {
id: window
@ -768,13 +767,6 @@ ApplicationWindow {
}
}
/* Persistent settings */
Settings {
category: "General"
property alias x: window.x
property alias y: window.y
}
/* Utility functions */
function httpRequest(url, callback) {
var xhr = new XMLHttpRequest();