on xenial help sign in
write some inline doc
34a3366Michael Zanetti
qml/Stages/DecoratedWindow.qml+4
@@ -22,6 +22,10 @@ import "Spread/MathUtils.js" as MathUtils
22FocusScope {
22FocusScope {
23 id: root
23 id: root
24
24
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.
25 implicitWidth: !counterRotate ? applicationWindow.implicitWidth : applicationWindow.implicitHeight
29 implicitWidth: !counterRotate ? applicationWindow.implicitWidth : applicationWindow.implicitHeight
26 implicitHeight: decorationHeight + (!counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth)
30 implicitHeight: decorationHeight + (!counterRotate ? applicationWindow.implicitHeight : applicationWindow.implicitWidth)
27
31
qml/Stages/DesktopStage.qml+8−2
@@ -445,12 +445,18 @@ AbstractStage {
445 }
445 }
446 }
446 }
447 z: normalZ
447 z: normalZ
448− x: requestedX // may be overridden in some states. Do not directly write to this.
448+
449− y: requestedY // may be overridden in some states. Do not directly write to this.
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.
450 property real requestedX: 0
453 property real requestedX: 0
451 property real requestedY: 0
454 property real requestedY: 0
452 property int requestedWidth: -1
455 property int requestedWidth: -1
453 property int requestedHeight: -1
456 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.
454 property int windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
460 property int windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
455 property int windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
461 property int windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
456 property int windowedWidth
462 property int windowedWidth