mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
1f789f8b16
commit
d8133e3c97
@ -21,7 +21,7 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
|
||||
|
||||
def draw(self, painter):
|
||||
r = self.parent().devicePixelRatioF()
|
||||
if self.shadow_pixmap.isNull() or self.savey != self.parent().y():
|
||||
if self.shadow_pixmap.isNull():
|
||||
|
||||
size = QSize(painter.device().width(), painter.device().height()) * r
|
||||
self.shadow_pixmap = QPixmap(size)
|
||||
@ -31,11 +31,11 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
|
||||
shadow_painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
for _ in range(self.x):
|
||||
super().draw(shadow_painter)
|
||||
self.savey = self.parent().y()
|
||||
self.savey = self.parent().y()
|
||||
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
painter.drawPixmap(
|
||||
-int(self.parent().x()),
|
||||
-int(self.parent().y()) - self.parent().parent().parent().parent().y(),
|
||||
-self.parent().parent().parent().parent().y() - self.savey,
|
||||
self.shadow_pixmap,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user