[UXTHEME] -Ignore the alpha channel so that TrasnparentBlt will be used when a bitmap...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 27 Aug 2017 10:55:30 +0000 (10:55 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 27 Aug 2017 10:55:30 +0000 (10:55 +0000)
svn path=/trunk/; revision=75688

reactos/dll/win32/uxtheme/msstyles.c

index a087943..866d96e 100644 (file)
@@ -875,7 +875,6 @@ static BOOL prepare_alpha (HBITMAP bmp, BOOL* hasAlpha)
         /* nothing to do */
         return TRUE;
 
-    *hasAlpha = TRUE;
     p = dib.dsBm.bmBits;
     n = dib.dsBmih.biHeight * dib.dsBmih.biWidth;
     /* AlphaBlend() wants premultiplied alpha, so do that now */
@@ -886,6 +885,9 @@ static BOOL prepare_alpha (HBITMAP bmp, BOOL* hasAlpha)
         p[1] = (p[1] * a) >> 8;
         p[2] = (p[2] * a) >> 8;
         p += 4;
+
+        if (a != 256)
+            *hasAlpha = TRUE;
     }
 
     return TRUE;