CR feedback magic numbers

This commit is contained in:
Brad Hefta-Gaub 2016-04-26 11:45:48 -07:00
parent ee277dcf9d
commit e7d26a8a63
3 changed files with 5 additions and 4 deletions

View file

@ -21,6 +21,7 @@ FocusScope {
objectName: "desktop"
anchors.fill: parent
readonly int INVALID_POSITION: -9999;
property rect recommendedRect: Qt.rect(0,0,0,0);
property var expectedChildren;

View file

@ -31,7 +31,7 @@ Fadable {
// decorations can extend outside it.
implicitHeight: content ? content.height : 0
implicitWidth: content ? content.width : 0
x: -9999; y: -9999
x: desktop.INVALID_POSITION; y: desktop.INVALID_POSITION;
enabled: visible
signal windowDestroyed();
@ -275,7 +275,7 @@ Fadable {
}
function centerOrReposition() {
if (x == -9999 && y == -9999) {
if (x == desktop.INVALID_POSITION && y == desktop.INVALID_POSITION) {
desktop.centerOnVisible(window);
} else {
desktop.repositionOnVisible(window);

View file

@ -19,7 +19,7 @@ Fadable {
// decorations can extend outside it.
implicitHeight: content ? content.height : 0
implicitWidth: content ? content.width : 0
x: -9999; y: -9999
x: desktop.INVALID_POSITION; y: desktop.INVALID_POSITION;
enabled: visible
signal windowDestroyed();
@ -125,7 +125,7 @@ Fadable {
}
function centerOrReposition() {
if (x == -9999 && y == -9999) {
if (x == desktop.INVALID_POSITION && y == desktop.INVALID_POSITION) {
desktop.centerOnVisible(window);
} else {
desktop.repositionOnVisible(window);