mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
03131f86b3
commit
1f789f8b16
@ -17,10 +17,12 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
|
||||
super().__init__(parent)
|
||||
self.shadow_pixmap = QPixmap()
|
||||
self.x = x
|
||||
self.savey = None
|
||||
|
||||
def draw(self, painter):
|
||||
r = self.parent().devicePixelRatioF()
|
||||
if self.shadow_pixmap.isNull():
|
||||
if self.shadow_pixmap.isNull() or self.savey != self.parent().y():
|
||||
|
||||
size = QSize(painter.device().width(), painter.device().height()) * r
|
||||
self.shadow_pixmap = QPixmap(size)
|
||||
self.shadow_pixmap.setDevicePixelRatio(r)
|
||||
@ -29,6 +31,7 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
|
||||
shadow_painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
for _ in range(self.x):
|
||||
super().draw(shadow_painter)
|
||||
self.savey = self.parent().y()
|
||||
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
painter.drawPixmap(
|
||||
-int(self.parent().x()),
|
||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
||||
|
||||
set(VERSION_MAJOR 5)
|
||||
set(VERSION_MINOR 35)
|
||||
set(VERSION_PATCH 0)
|
||||
set(VERSION_PATCH 1)
|
||||
|
||||
add_library(pch pch.cpp)
|
||||
target_precompile_headers(pch PUBLIC pch.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user