mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44: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):
|
def draw(self, painter):
|
||||||
r = self.parent().devicePixelRatioF()
|
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
|
size = QSize(painter.device().width(), painter.device().height()) * r
|
||||||
self.shadow_pixmap = QPixmap(size)
|
self.shadow_pixmap = QPixmap(size)
|
||||||
@ -35,7 +35,7 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
|
|||||||
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||||
painter.drawPixmap(
|
painter.drawPixmap(
|
||||||
-int(self.parent().x()),
|
-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,
|
self.shadow_pixmap,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user