Skip to content

Commit

Permalink
process oversized items first
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Nov 24, 2019
1 parent a95c9bb commit ed5509d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/BaseView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ed5509d

Please sign in to comment.