On Fri, Jul 8, 2011 at 08:30, Max Vlasov <[email protected]> wrote:
> So apparently there's the controls unit that triggers the largest
> part. If you add this to the uses list of a simple program you will
> get well-known "minimum" size program. There's nothing one can do
> currently with this since it's triggers many important things in
> initialization section, uses Forms for Delphi compatibility (that also
> triggers much) so no chances to find anything real to remove. But to
> my surprise the unit Graphics also triggered the same size 1.5MB on
> windows.
>
> So after some investigation I came up with a one minor fix. If ImgList
> is removed from the Themes implementation section and
> DrawIcon(ACanvas...) made blank, Graphics no longer indirectly uses
> Controls unit . The only place that uses this overloaded
> DrawIcon(ACanvas method is \lcl\include\headercontrol.inc. Sure this
> change is not a fix that works, but just proof-of-concept change that
> shows that this method either can be moved somewhere or replace with
> something else allowing existence of Graphics without Widget Set
> (Factory) usage.

This is excellent news for me, since I have long planned to get rid of
Graphics unit in TAChart to avoid widgetset dependency.
I thought that Graphics depends on WidgetSet due to Delphi compatibility.
If in fact the dependency is just an implementation accident,
I would like it very much to see it gone.

Can you post a patch of your changes for easier review/discussion?

-- 
Alexander S. Klenin

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to