diff --git a/debian/changelog b/debian/changelog index 16d7b36..fa6f472 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +lximage-qt (1.1.0-0ubuntu3) kinetic; urgency=medium + + * Add upstream patch which fixes repainting of cached images: + - https://github.com/lxqt/lximage-qt/pull/558 + - https://github.com/lxqt/lximage-qt/commit/a526f1 + + -- Simon Quigley Wed, 22 Jun 2022 00:06:31 -0500 + lximage-qt (1.1.0-0ubuntu2) kinetic; urgency=medium * Add missing entry to install file. diff --git a/debian/patches/fix-repainting-cached-images.patch b/debian/patches/fix-repainting-cached-images.patch new file mode 100644 index 0000000..e1ac30f --- /dev/null +++ b/debian/patches/fix-repainting-cached-images.patch @@ -0,0 +1,27 @@ +From a526f1b0fcfe1d15368c1d3fdf4676c40fb8524d Mon Sep 17 00:00:00 2001 +From: tsujan +Date: Tue, 21 Jun 2022 01:14:55 +0430 +Subject: [PATCH] Fixed repainting of cached images (#558) + +Previously, the cached pixmap was drawn inside the repaint rectangle. That was wrong because there's no guarantee that the repaint rectangle is as big as the cached pixmap (e.g., it isn't so when the toolbar extension popup covers a part of the image and slides back). Therefore, visual glitches were imminent in special cases. + +This patch draws the cached pixmap inside its corresponding cache rectangle, so that the image is always repainted correctly. The paint clipping is done by Qt automatically, as QPaintEvent's doc explains. + +Fixes https://github.com/lxqt/lximage-qt/issues/557 +--- + src/imageview.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/imageview.cpp b/src/imageview.cpp +index 4a0c6b2..aa13393 100644 +--- a/src/imageview.cpp ++++ b/src/imageview.cpp +@@ -630,7 +630,7 @@ void ImageView::paintEvent(QPaintEvent* event) { + if(cachedRect_.contains(repaintImageRect)) { + QPainter painter(viewport()); + painter.fillRect(event->rect(), backgroundBrush()); +- painter.drawPixmap(repaintImageRect, cachedPixmap_); ++ painter.drawPixmap(cachedRect_, cachedPixmap_); + // outline + if(showOutline_) { + QColor col = QColor(Qt::black); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..111c98a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +fix-repainting-cached-images.patch