[Customdrawn] Some patches for dialogs and palette
Giuliano Colla
giuliano.colla at fastwebnet.it
Mon Sep 10 14:07:15 CEST 2012
Hi Felipe,
I finally managed to squeeze some time to work on Lazarus.
Find here enclosed a svn diff, with my patches. They are:
1) A patch to show the icons for Custom Drawn components on the IDE
palette in
/components/customdrawn/customdrawnextra.pas
I took the standard LCL icons, tried to add a CD, but the first attempt
was a failure, because once scaled to the proper size, the CD was too
thin and very ugly. So for the moment I just used the standard images,
while I experiment on different fonts/font size etc, to provide a
pleasant image. For the moment, however IMHO standard images are better
than the default image for all.
You'll need to put in the same directory (i.e. /components/customdrawn/
)the resource file (enclosed) paletteimg.lrs, which doesn't show in
diff, because it's not yet under svn control.
2) A patch in /lcl/buttons.pp to make public a number of constants of
TBitBtn which are reused in TCDButton (I checked with Mattias that it
can be done without risk)
3) A number of patches in /lcl/customdrawncontrols.pas, to extend
TCDButton functionality adding the main features of TBitBtn.
4) A number of patches in /lcl/lazdialogs.pas to implement the class
TCDLazMessageDialog, and the functions LazMessageDlg which provide the
same functionality of the standard MessageDlg. (There are many
overloaded functions, I just implemented the two most common. Others are
trivial, and can be added later)
5) Two patches to /lcl/interfaces/customdrawn/customdrawnobject_X11.inc.
They're a leftover of the previous patches, which I never sent, It
appears. They avoid to send too many useless X11 mouse move and notify
events, speeding up things, in presence of fast mouse movements or
multiple notify such as in resizing/moving.
In order to test the custom drawn dialogs, and to compare with standard
Lazarus Dialogs, I've made a small test program which makes life a bit
easier. I can't enclose it, because of its size. You may get it from:
http://www.copeca.it/colla/lazdlgtest.zip
and see if it's worth adding to the examples directory, or not.
Kind regards,
Giuliano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cddlgs.diff
Type: text/x-patch
Size: 15674 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/customdrawn/attachments/20120910/a662dcab/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: paletteimg.lrs
Type: text/lazarus-resource
Size: 14667 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/customdrawn/attachments/20120910/a662dcab/attachment-0005.bin>
More information about the Customdrawn
mailing list