Commit 244d0a47 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix screenshots display when there's few screenshots

Make sure we don't divide by 0
parent d2eb6c6f
......@@ -142,7 +142,7 @@ ListView {
layer.effect: ShaderEffect {
readonly property var colorSource: root;
readonly property real distLeft: Math.max(20, 2000/(root.contentX + 1) - 1)
readonly property real distRight: Math.max(20, 2000/Math.max(0, root.contentWidth - (root.contentX + root.width) + 1) - 1)
readonly property real distRight: Math.max(20, 2000/Math.max(1, root.contentWidth - (root.contentX + root.width) + 1) - 1)
fragmentShader: "
uniform lowp float distLeft;
uniform lowp float distRight;
......
Markdown is supported
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