Rename valid window function

This commit is contained in:
Dag Heyman 2017-05-12 10:02:13 +02:00
parent 1c845cc788
commit ec41083314
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338

View File

@ -55,7 +55,7 @@ ApplicationWindow {
Component.onCompleted: { Component.onCompleted: {
updateTrayVisability() updateTrayVisability()
ensureWindowInValidPosition() ensureValidWindowPosition()
} }
Component.onDestruction: saveScreenLayout() Component.onDestruction: saveScreenLayout()
@ -345,8 +345,8 @@ ApplicationWindow {
settings.desktopAvailableHeight = Screen.desktopAvailableHeight settings.desktopAvailableHeight = Screen.desktopAvailableHeight
} }
function ensureWindowInValidPosition() { function ensureValidWindowPosition() {
// If we have the same desktop(s) dimensions as last time, use the saved position. // If we have the same desktop dimensions as last time, use the saved position.
// If not, put the window in the middle of the screen. // If not, put the window in the middle of the screen.
var savedScreenLayout = (settings.desktopAvailableWidth === Screen.desktopAvailableWidth) var savedScreenLayout = (settings.desktopAvailableWidth === Screen.desktopAvailableWidth)
&& (settings.desktopAvailableHeight === Screen.desktopAvailableHeight) && (settings.desktopAvailableHeight === Screen.desktopAvailableHeight)