From 14fdb7e6f9cb41739a8dc069c2abbdf21462e6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Peterson?= Date: Wed, 12 Jun 2024 17:12:31 -0500 Subject: [PATCH] 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. --- components/lazutils/graphtype.pp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/lazutils/graphtype.pp b/components/lazutils/graphtype.pp index 73621ec25e..3c7ee17763 100644 --- a/components/lazutils/graphtype.pp +++ b/components/lazutils/graphtype.pp @@ -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;