[Notifications] Use popupWidth for thumbnail size

Instead of relying on the thumbnail strip size, which can temporarily
change during (re)layouting and/or be incorrect when we initially fetch
the thumbnail.

The potential change in image fidelity in notification history is
imho justifiable over the improved speed and reliability of thumbnail
generation when we don't needlessly create a pixmap we don't use.
wilder-5.25
Kai Uwe Broulik 4 years ago committed by Nate Graham
parent f3293bc59e
commit 3234fa2d46
  1. 6
      applets/notifications/package/contents/ui/ThumbnailStrip.qml

@ -16,6 +16,8 @@ import org.kde.kquickcontrolsaddons 2.0 as KQCAddons
import org.kde.plasma.private.notifications 2.0 as Notifications
import "global"
DraggableFileArea {
id: thumbnailArea
@ -71,7 +73,9 @@ DraggableFileArea {
url: urls[0]
// height is dynamic, so request a "square" size and then show it fitting to aspect ratio
size: Qt.size(thumbnailArea.width, thumbnailArea.width)
// Also use popupWidth instead of our width to ensure it is fixed and doesn't
// change temporarily during (re)layouting
size: Qt.size(Globals.popupWidth, Globals.popupWidth)
}
KQCAddons.QPixmapItem {

Loading…
Cancel
Save