Add upstream patch which fixes repainting of cached images.
This commit is contained in:
		
							parent
							
								
									fdf52383cc
								
							
						
					
					
						commit
						2617c09a0d
					
				
							
								
								
									
										8
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							| @ -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 <tsimonq2@ubuntu.com>  Wed, 22 Jun 2022 00:06:31 -0500 | ||||||
|  | 
 | ||||||
| lximage-qt (1.1.0-0ubuntu2) kinetic; urgency=medium | lximage-qt (1.1.0-0ubuntu2) kinetic; urgency=medium | ||||||
| 
 | 
 | ||||||
|   * Add missing entry to install file. |   * Add missing entry to install file. | ||||||
|  | |||||||
							
								
								
									
										27
									
								
								debian/patches/fix-repainting-cached-images.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								debian/patches/fix-repainting-cached-images.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | From a526f1b0fcfe1d15368c1d3fdf4676c40fb8524d Mon Sep 17 00:00:00 2001 | ||||||
|  | From: tsujan <tsujan2000@gmail.com> | ||||||
|  | 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); | ||||||
							
								
								
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | fix-repainting-cached-images.patch | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user