Commit 14c9ef14 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Nate Graham
Browse files

ApplicationPage: Fix infinite resize loop on screenshoots

We were fitting it in height and it was freaking out whenever the
horizontal scrollbar appeared.

Now it depends on the ScrollView size instead of the ListView and so the
loop is broken.

BUG: 449583
parent d9311104
Pipeline #133289 passed with stage
in 53 seconds
......@@ -208,6 +208,7 @@ DiscoverPage {
ApplicationScreenshots {
id: screenshots
resource: appInfo.application
delegateHeight: parent.Layout.preferredHeight * 0.8
}
}
......
......@@ -30,12 +30,14 @@ ListView {
id: screenshotsModel
}
property real delegateHeight: Kirigami.Units.gridUnit * 4
delegate: AbstractButton {
readonly property url imageSource: large_image_url
readonly property real proportion: thumbnail.sourceSize.width>1 ? thumbnail.sourceSize.height/thumbnail.sourceSize.width : 1
implicitWidth: thumbnail.width
implicitHeight: root.height
implicitWidth: root.delegateHeight / proportion
implicitHeight: root.delegateHeight
hoverEnabled: true
onClicked: {
......@@ -49,9 +51,6 @@ ListView {
background: Image {
id: thumbnail
readonly property real proportion: thumbnail.sourceSize.width>1 ? thumbnail.sourceSize.height/thumbnail.sourceSize.width : 1
width: root.height / proportion
height: root.height
BusyIndicator {
visible: running
......
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