Commit 3d628e42 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Merge branch 'Plasma/5.17'

parents 6223e96c fb3a2a15
......@@ -46,7 +46,7 @@ Flickable {
y: (parent.height - height)/2
readonly property real proportion: overlayImage.sourceSize.width>1 ? overlayImage.sourceSize.height/overlayImage.sourceSize.width : 1
height: overlayImage.status == Image.Loading ? Kirigami.Units.gridUnit * 5 : Math.min(parent.height * 0.9, (parent.width * 0.9) * proportion, overlayImage.sourceSize.height)
width: height/proportion
width: (height - 2 * padding)/proportion
BusyIndicator {
id: indicator
......@@ -118,7 +118,7 @@ Flickable {
delegate: MouseArea {
readonly property url imageSource: large_image_url
readonly property real proportion: thumbnail.sourceSize.width>1 ? thumbnail.sourceSize.height/thumbnail.sourceSize.width : 1
width: Math.min(Math.max(50, height/proportion), thumbnail.status == Image.Loading ? height : thumbnail.sourceSize.width)
width: Math.min(root.width/3, Math.min(Math.max(50, height/proportion), thumbnail.status == Image.Loading ? height : thumbnail.sourceSize.width))
height: screenshotsLayout.height
hoverEnabled: true
......@@ -149,9 +149,11 @@ Flickable {
Image {
id: thumbnail
source: small_image_url
height: parent.height
height: parent.proportion>1 ? parent.height : undefined
width: parent.proportion<=1 ? parent.width : undefined
fillMode: Image.PreserveAspectFit
smooth: true
anchors.verticalCenter: parent.verticalCenter
onStatusChanged: if (status === Image.Error) {
screenshotsModel.remove(small_image_url)
}
......
......@@ -225,7 +225,7 @@ void PackageKitUpdater::finished(PackageKit::Transaction::Exit exit, uint /*time
m_backend->fetchUpdates();
fetchLastUpdateTime();
if (useOfflineUpdates()) {
if (useOfflineUpdates() && exit == PackageKit::Transaction::ExitSuccess) {
PackageKit::Daemon::global()->offline()->trigger(PackageKit::Offline::ActionReboot);
Q_EMIT passiveMessage(i18n("Please restart the computer to finish the update"));
}
......
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