mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
94327aed2b
commit
868250cd7b
@ -16,10 +16,8 @@ class pixlabel(QLabel):
|
|||||||
if self.pix:
|
if self.pix:
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||||
pix = QPixmap(self.size() * self.devicePixelRatioF())
|
|
||||||
pix.fill(Qt.GlobalColor.transparent)
|
painter.drawPixmap(
|
||||||
paintpix = QPainter(pix)
|
|
||||||
paintpix.drawPixmap(
|
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
self.pix.scaled(
|
self.pix.scaled(
|
||||||
@ -28,8 +26,6 @@ class pixlabel(QLabel):
|
|||||||
Qt.TransformationMode.SmoothTransformation,
|
Qt.TransformationMode.SmoothTransformation,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
paintpix.end()
|
|
||||||
painter.drawPixmap(0, 0, pix)
|
|
||||||
|
|
||||||
return super().paintEvent(a0)
|
return super().paintEvent(a0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user