mirror of https://github.com/procxx/kepka.git
				
				
				
			Fix background preview on retina screens.
This commit is contained in:
		
							parent
							
								
									9b3c103f16
								
							
						
					
					
						commit
						2eb6848eb8
					
				|  | @ -88,8 +88,8 @@ QImage PrepareScaledNonPattern( | ||||||
| 		: (height * size / width); | 		: (height * size / width); | ||||||
| 	return Images::prepare( | 	return Images::prepare( | ||||||
| 		image, | 		image, | ||||||
| 		takeWidth, | 		takeWidth * cIntRetinaFactor(), | ||||||
| 		takeHeight, | 		takeHeight * cIntRetinaFactor(), | ||||||
| 		Images::Option::Smooth | 		Images::Option::Smooth | ||||||
| 		| Images::Option::TransparentBackground | 		| Images::Option::TransparentBackground | ||||||
| 		| blur, | 		| blur, | ||||||
|  | @ -141,7 +141,7 @@ QImage ColorizePattern(QImage image, QColor color) { | ||||||
| 		maskBytes += maskBytesAdded; | 		maskBytes += maskBytesAdded; | ||||||
| 		resultInts += resultIntsAdded; | 		resultInts += resultIntsAdded; | ||||||
| 	} | 	} | ||||||
| 	return std::move(image); | 	return image; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QImage PrepareScaledFromFull( | QImage PrepareScaledFromFull( | ||||||
|  |  | ||||||
|  | @ -120,7 +120,7 @@ QImage PreparePatternImage(QImage image, QColor bg, QColor fg, int intensity) { | ||||||
| 		fg.alphaF() * std::clamp(intensity / 100., 0., 1.)); | 		fg.alphaF() * std::clamp(intensity / 100., 0., 1.)); | ||||||
| 	if (!alpha) { | 	if (!alpha) { | ||||||
| 		image.fill(bg); | 		image.fill(bg); | ||||||
| 		return std::move(image); | 		return image; | ||||||
| 	} | 	} | ||||||
| 	fg.setAlpha(255); | 	fg.setAlpha(255); | ||||||
| 	const auto patternBg = anim::shifted(bg); | 	const auto patternBg = anim::shifted(bg); | ||||||
|  | @ -158,7 +158,7 @@ QImage PreparePatternImage(QImage image, QColor bg, QColor fg, int intensity) { | ||||||
| 		maskBytes += maskBytesAdded; | 		maskBytes += maskBytesAdded; | ||||||
| 		resultInts += resultIntsAdded; | 		resultInts += resultIntsAdded; | ||||||
| 	} | 	} | ||||||
| 	return std::move(image); | 	return image; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| } // namespace
 | } // namespace
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue