on xenial help sign in
and again
commit57566ecf290c6caf55eb6807963121eaa3c511fa authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 4 Feb 2015, 11:10 (12 years ago) parent654389b
2 files changed+9−9
qml/Components/WindowPositionStorage/WindowPositionStorage.qml+2−2 qml/Stages/WindowMoveResizeArea.qml+7−7
qml/Components/WindowPositionStorage/WindowPositionStorage.qml+2−2
@@ -37,14 +37,14 @@ QtObject {
3737 }
3838 }
3939
40− function saveGeometry(windowId, x, y, width, height) {
40+ function saveState(windowId, x, y, width, height) {
4141 priv.openDB();
4242 priv.db.transaction( function(tx){
4343 tx.executeSql('INSERT OR REPLACE INTO windowproperties VALUES(?, ?, ?, ?, ?)', [windowId, x, y, width, height]);
4444 });
4545 }
4646
47− function getGeometry(windowId) {
47+ function getState(windowId) {
4848 priv.openDB();
4949 var res = new Object();
5050 priv.db.transaction(function(tx) {
qml/Stages/WindowMoveResizeArea.qml+7−7
@@ -50,12 +50,12 @@ MouseArea {
5050 }
5151
5252 Component.onCompleted: {
53− var windowGeometry = WindowPositionStorage.getGeometry(root.windowId)
54− if (windowGeometry !== undefined) {
55− target.x = windowGeometry.x
56− target.y = windowGeometry.y
57− target.width = windowGeometry.width
58− target.height = windowGeometry.height
53+ var windowState = WindowPositionStorage.getState(root.windowId)
54+ if (windowState !== undefined) {
55+ target.x = windowState.x
56+ target.y = windowState.y
57+ target.width = windowState.width
58+ target.height = windowState.height
5959 }
6060 }
6161
@@ -109,6 +109,6 @@ MouseArea {
109109 }
110110
111111 onReleased: {
112− WindowPositionStorage.saveGeometry(root.windowId,target.x, target.y, target.width, target.height)
112+ WindowPositionStorage.saveState(root.windowId,target.x, target.y, target.width, target.height)
113113 }
114114}