This commit is contained in:
恍兮惚兮 2024-09-13 10:25:03 +08:00
parent 1f789f8b16
commit d8133e3c97

View File

@ -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)
@ -35,7 +35,7 @@ class CachedQGraphicsDropShadowEffect_multi(QGraphicsDropShadowEffect):
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,
)