Disabled Drawing of Glyphs

It seems that some feature of old ElPack (V6) is missed in 2014er Version.
We have added follwing code to the TLMDButtonGlyph.DrawButtonGlyph methode:

      ...
      if (IcH > 0) and (IcW > 0) then
      begin
-> New Code starts here
        if State = ebsDisabled then
        begin
          LPNGGrayFilter := TLMDPNGGrayscaleFilter.Create;

          try
            LPNGGrayFilter.SourceImage := FPngGlyph;

            if FStretched then
              LPNGGrayFilter.ResultImage.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + FStrW, GlyphPos.Y + FStrH))
            else
              LPNGGrayFilter.ResultImage.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + IcW, GlyphPos.Y + IcH));
          finally
            LPNGGrayFilter.Free;
          end;
        end
        else
        begin
-> New Code ends here
          if FStretched then
            FPngGlyph.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + FStrW, GlyphPos.Y + FStrH))
          else
            FPngGlyph.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + IcW, GlyphPos.Y + IcH));
        end;

Can you re-integrate this behaviour to the SVN-Sourcecode.






Sign In or Register to comment.