From ed5509d45447b5a5e4749ac81e154f4205855b01 Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Sun, 24 Nov 2019 17:59:10 +0000 Subject: [PATCH] process oversized items first --- core/BaseView.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/BaseView.qml b/core/BaseView.qml index 047e0a857..3eb1d6da5 100644 --- a/core/BaseView.qml +++ b/core/BaseView.qml @@ -304,10 +304,10 @@ BaseLayout { var w = this.width, h = this.height var atCenter = x - w / 2 + iw / 2 - if (center && this.contentWidth > w) - this.contentX = atCenter < 0 ? 0 : x > this.contentWidth - w / 2 - iw / 2 ? this.contentWidth - w : atCenter - else if (iw > w) + if (iw > w) this.contentX = centerOversized? atCenter: x + else if (center && this.contentWidth > w) + this.contentX = atCenter < 0 ? 0 : x > this.contentWidth - w / 2 - iw / 2 ? this.contentWidth - w : atCenter else if (x - cx <= 0) this.contentX = x else if (x - cx + iw > w) @@ -321,10 +321,10 @@ BaseLayout { var w = this.width, h = this.height var atCenter = y - h / 2 + ih / 2 - if (center && this.contentHeight > h) - this.contentY = atCenter < 0 ? 0 : y > this.contentHeight - h / 2 - ih / 2 ? this.contentHeight - h : atCenter - else if (ih > h) + if (ih > h) this.contentY = centerOversized? atCenter: y + else if (center && this.contentHeight > h) + this.contentY = atCenter < 0 ? 0 : y > this.contentHeight - h / 2 - ih / 2 ? this.contentHeight - h : atCenter else if (y - cy <= 0) this.contentY = y else if (y - cy + ih > h)