diff options
| author | likeawindrammer <31085911+likeawindrammer@users.noreply.github.com> | 2020-08-23 13:58:30 -0600 |
|---|---|---|
| committer | likeawindrammer <31085911+likeawindrammer@users.noreply.github.com> | 2020-08-23 13:58:30 -0600 |
| commit | d1ac36d3c2bf4f6a42f0a0670baff07b26110656 (patch) | |
| tree | 4f1f02fd4ed8c7b0688972d1f4c332bab96ad847 /src/aoemotebutton.cpp | |
| parent | 9f4487d9cfff049f94bcfdc4c03de831ddce39fb (diff) | |
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.
Diffstat (limited to 'src/aoemotebutton.cpp')
| -rw-r--r-- | src/aoemotebutton.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/aoemotebutton.cpp b/src/aoemotebutton.cpp index 90535607..652010d2 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()); |
