[Lazarus] Speed of build process
Roland Turcan
konf at rotursoft.sk
Tue May 26 10:28:25 CEST 2009
First, I know i touch a sensitive code but we can discuss about it.
1 - Added TVisualCompont it is between TLCLComponent and and TControl,
it has a properties and methods that have visual effect but still it
unvisible at form. i will use it for BidiMode and ParentBidimode
TMenu, TPopupMenu, TScreen, TTrayIcon and TPopupNotifier and any
component need bidimode , TTheme and TToolbar...
Now it can detect if the Component was inherited from TVisualComponent
to make loop when BidiMode changed in the form/control.
Remove duplicating of implement the same code in both TControl and
TMenu and every TComponent need the BidiMode.
I kept UseRightToLeftScrollBar in TControl
TApplicationProperties must *not* inherit it from TVisualComponent it
is like TApplication have no ParentBidiMode
Fix: TLabel alignment when BidiMode = bdRightToLeft (compatible with Delphi)
2 - Add: in FlipChildren now flip the Anchors also.
3- Added: AutoFlipChildren to TApplication, now when change the
BidiMode of Applcication it change the BidiMode of Forms and
FlipChildren for it.
4 - I removed this code from application.inc (see below) in
TApplication.Create, because :
* BidiMode of Application depend on developer choice not depend on
system locale.
* What if i built an English tools/application then run it in right to
left system locale, it will be launch as RightToLeft while it is not
designed for that.
* If we use a multinlanguage, BidiMode changed depend on the language
chosen by user, while every developer has own translation
model/library not only GetText.
it make confused with BidiMode of TForm when the form has ParentBidiMode
Also it force to compile GetText while i am not use GetText.
--------------- this code i commented temporary
{$ifndef wince}// remove ifdef when gettext is fixed
GetLanguageIDs(LangDefault, LangFallback);
if LangDefault <> '' then
FBidiMode := BidiModeMap[IsRTLLang(LangDefault)]
else
FBidiMode := BidiModeMap[IsRTLLang(LangFallback)];
{$else}
FBidiMode := bdLeftToRight;
{$endif}
--------------
If you not like TVisualCompont i can merge the code of BidiMode of it
to TLCLComponent, but not all components have ParentBidiMode Like as
TScreen, TApplicationProperties for example.
--
Zaher Dirkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VisualComponent.patch
Type: application/octet-stream
Size: 34686 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090525/0f9e3bb8/attachment-0004.obj>
More information about the Lazarus
mailing list