[PATCH 1/2] comctl32/tests: Add tests for appearance of disabled toolbar button.

Ziqing Hui zhui at codeweavers.com
Wed Mar 4 04:31:51 CST 2020


On 3/4/20 6:07 PM, Nikolay Sivov wrote:
>
>
> On 3/4/20 12:41 PM, Ziqing Hui wrote:
>> According to my tests, on v6 comctl32, a toolbar button which contains a 32bpp bitmap with alpha channel will become grayscale if disabled. This can be indicated by the first tests patch.
>>
>> In conclusion, for v6 comctl32, here is the disabled toolbar button appearance in different situation:
>> * 32bpp with alpha channel: Grayscale (This is not supported before v6)
>> * 32bpp without alpha channel ("without alpha channel" means each pixel's alpha value is set to 0): Solid color
>> * not 32bpp (maybe 24bpp, 16bpp etc.): Solid color
>>
>> Current wine doesn't implement the grayscale situation, which leads to wine bug 24784. This patch set fix it.
>>
>> The test code is run under v6, because grayscale is not supported before v6.
>>
>> Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
>> ---
>>   dlls/comctl32/tests/toolbar.c | 201 ++++++++++++++++++++++++++++++++++
>>   1 file changed, 201 insertions(+)
>>
>>
>>
> This test is overkill I think, we don't need it if imagelist functionality covers such grayscale conversion for 32bpp.
>
OK, I'll see ILS_SATURATE first.
>> +    const COLORREF win_solid[] =
>> +    {
>> +        RGB(0xac, 0xa8, 0x99), /* winXP*/
>> +        RGB(0x80, 0x80, 0x80), /* win2008*/
>> +        RGB(0xa0, 0xa0, 0xa0)  /* win10*/
>> +    };
> Does this come from theme/system colors by any chance?
>
I got these color by simply print pixel colors. I'll try if I can get them from theme/system colors.




More information about the wine-devel mailing list