Removed DimPercent/DimColor calculation. The existing grayscale calculation doesn't change the icon if it's already grayscale, and that was a remnant from an earlier patch that simulated the alpha that ddesDarken does.

This commit is contained in:
Zoë Peterson 2024-06-12 17:12:31 -05:00 committed by Maxim Ganetsky
parent b8bb9527ef
commit 14fdb7e6f9

View File

@ -1679,20 +1679,16 @@ begin
with AData^ do
begin
Gray := (Red + Green + Blue) div 3;
// Apply existing alpha and reduce visibility by a further 66%
if DisabledDrawEffectStyle = ddesLighten then
begin
// Apply existing alpha and reduce visibility by a further 66%
Alpha := Byte((Integer(Gray) * Alpha) div 768);
Gray := $FF;
end
else begin
Gray := Byte(Integer(Gray) + Integer((DimPercent * (DimColor - Gray)) div 100));
if DisabledDrawEffectStyle = ddesDarken then
begin
// Apply existing alpha and Reduce visibility by a further 25%
Alpha := Byte((Integer($FF - Gray) * Alpha) div 384);
Gray := $00;
end;
else if DisabledDrawEffectStyle = ddesDarken then
begin
Alpha := Byte((Integer($FF - Gray) * Alpha) div 768);
Gray := $00;
end;
Red := Gray;
Green := Gray;