Commit cb3cbbe3 authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Nate Graham
Browse files

folderview: Fix grid overflow property so it properly reports overflow state

In some cases, viewportArea.widthRatio or heightRatio can be 0 when it's
not actually overflowing. So account for that to ensure we properly
report the overflow state.

BUG: 419878


(cherry picked from commit 754e229b)
parent 8efdd5fd
Pipeline #232969 passed with stage
in 7 minutes and 45 seconds
......@@ -657,7 +657,13 @@ FocusScope {
property bool ctrlPressed: false
property bool shiftPressed: false
property bool overflowing: (visibleArea.heightRatio < 1.0 || visibleArea.widthRatio < 1.0)
property bool overflowing: {
// widthRatio or heightRatio may be 0 when it's not actually
// overflowing, so account for that.
let widthOverflow = visibleArea.widthRatio > 0.0 && visibleArea.widthRatio < 1.0
let heightOverflow = visibleArea.heightRatio > 0.0 && visibleArea.heightRatio < 1.0
return widthOverflow || heightOverflow
}
property bool scrollLeft: false
property bool scrollRight: false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment