From d1ac36d3c2bf4f6a42f0a0670baff07b26110656 Mon Sep 17 00:00:00 2001 From: likeawindrammer <31085911+likeawindrammer@users.noreply.github.com> Date: Sun, 23 Aug 2020 13:58:30 -0600 Subject: [PATCH] Fix: Qt failing to paint a darker button if source image is indexed By converting the image to an 8-bits per channel image with alpha channel we make sure the client won't fail painting a darker button, and keep the transparency if the source image had. --- src/aoemotebutton.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aoemotebutton.cpp b/src/aoemotebutton.cpp index 9053560..652010d 100644 --- a/src/aoemotebutton.cpp +++ b/src/aoemotebutton.cpp @@ -27,6 +27,7 @@ void AOEmoteButton::set_image(QString p_image, QString p_emote_comment) } else if (p_image.contains("_on") && file_exists(tmp_p_image.replace("_on", "_off"))) { QImage tmpImage(tmp_p_image); + tmpImage = tmpImage.convertToFormat(QImage::Format_ARGB32); QPoint p1, p2; p2.setY(tmpImage.height());