From 97ef8e8d0ee063315aeae5c29abcdc53563c0431 Mon Sep 17 00:00:00 2001 From: maple! Date: Thu, 10 Aug 2023 15:32:47 +0200 Subject: Fix transparency in skin icon QPainter has a bug where drawing transparency to a freshly initialized, empty QPixmap causes garbage data to be drawn. This broke the rendering of the skin icon. The fix is simply to fill the QPixmap with empty transparent pixels beforehand. Signed-off-by: maple! --- launcher/minecraft/auth/MinecraftAccount.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'launcher/minecraft/auth') diff --git a/launcher/minecraft/auth/MinecraftAccount.cpp b/launcher/minecraft/auth/MinecraftAccount.cpp index 1dcea207..79213fe9 100644 --- a/launcher/minecraft/auth/MinecraftAccount.cpp +++ b/launcher/minecraft/auth/MinecraftAccount.cpp @@ -126,6 +126,7 @@ QPixmap MinecraftAccount::getFace() const return QPixmap(); } QPixmap skin = QPixmap(8, 8); + skin.fill(QColorConstants::Transparent); QPainter painter(&skin); painter.drawPixmap(0, 0, skinTexture.copy(8, 8, 8, 8)); painter.drawPixmap(0, 0, skinTexture.copy(40, 8, 8, 8)); -- cgit