on xenial help sign in
better naming part 2
654389bMichael Zanetti
qml/Components/WindowPositionStorage/WindowPositionStorage.qml+2−2
@@ -37,14 +37,14 @@ QtObject {
37 }
37 }
38 }
38 }
39
39
40− function savePosition(windowId, x, y, width, height) {
40+ function saveGeometry(windowId, x, y, width, height) {
41 priv.openDB();
41 priv.openDB();
42 priv.db.transaction( function(tx){
42 priv.db.transaction( function(tx){
43 tx.executeSql('INSERT OR REPLACE INTO windowproperties VALUES(?, ?, ?, ?, ?)', [windowId, x, y, width, height]);
43 tx.executeSql('INSERT OR REPLACE INTO windowproperties VALUES(?, ?, ?, ?, ?)', [windowId, x, y, width, height]);
44 });
44 });
45 }
45 }
46
46
47− function getPosition(windowId) {
47+ function getGeometry(windowId) {
48 priv.openDB();
48 priv.openDB();
49 var res = new Object();
49 var res = new Object();
50 priv.db.transaction(function(tx) {
50 priv.db.transaction(function(tx) {
qml/Stages/WindowMoveResizeArea.qml+7−7
@@ -50,12 +50,12 @@ MouseArea {
50 }
50 }
51
51
52 Component.onCompleted: {
52 Component.onCompleted: {
53− var windowSizePosition = WindowPositionStorage.getPosition(root.windowId)
53+ var windowGeometry = WindowPositionStorage.getGeometry(root.windowId)
54− if (windowSizePosition !== undefined) {
54+ if (windowGeometry !== undefined) {
55− target.x = windowSizePosition.x
55+ target.x = windowGeometry.x
56− target.y = windowSizePosition.y
56+ target.y = windowGeometry.y
57− target.width = windowSizePosition.width
57+ target.width = windowGeometry.width
58− target.height = windowSizePosition.height
58+ target.height = windowGeometry.height
59 }
59 }
60 }
60 }
61
61
@@ -109,6 +109,6 @@ MouseArea {
109 }
109 }
110
110
111 onReleased: {
111 onReleased: {
112− WindowPositionStorage.savePosition(root.windowId,target.x, target.y, target.width, target.height)
112+ WindowPositionStorage.saveGeometry(root.windowId,target.x, target.y, target.width, target.height)
113 }
113 }
114}
114}