on xenial help sign in
write some inline doc
commit34a3366c55ca304625c810c5c0c852eb919a2f4b authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 19 Jul 2016, 17:29 (10 years ago) parent40c38ac
2 files changed+12−2
qml/Stages/DecoratedWindow.qml+4 qml/Stages/DesktopStage.qml+8−2
qml/Stages/DecoratedWindow.qml+4
@@ -22,6 +22,10 @@ import "Spread/MathUtils.js" as MathUtils
2222FocusScope {
2323 id: root
2424
25+ // The DecoratedWindow takes requestedWidth/requestedHeight and asks it's surface to be resized to that
26+ // (minus the window decoration size in case hasDecoration and showDecoration are true)
27+ // The surface might not be able to resize to the requested values. It will return its actual size
28+ // in implicitWidth/implicitHeight.
2529 implicitWidth: !counterRotate ? applicationWindow.implicitWidth : applicationWindow.implicitHeight
2630 implicitHeight: decorationHeight + (!counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth)
2731
qml/Stages/DesktopStage.qml+8−2
@@ -445,12 +445,18 @@ AbstractStage {
445445 }
446446 }
447447 z: normalZ
448− x: requestedX // may be overridden in some states. Do not directly write to this.
449− y: requestedY // may be overridden in some states. Do not directly write to this.
448+
449+ // requestedX/Y/width/height is what we ask the actual surface to be.
450+ // Do not write to those, they will be set by states
451+ // Also do not write to the appWindow's actual x,y,width,height as they
452+ // will be set by states too.
450453 property real requestedX: 0
451454 property real requestedY: 0
452455 property int requestedWidth: -1
453456 property int requestedHeight: -1
457+
458+ // In those are for windowed mode. Those values basically store the window's properties
459+ // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
454460 property int windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
455461 property int windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
456462 property int windowedWidth