[lazarus] delphi compatibility

Marc Weustink Marc.Weustink at cuperus.nl
Wed Feb 6 08:30:58 EST 2002

+ From: Michal Bukovjan [mailto:michal.bukovjan at openone.cz]
+ Marc Weustink wrote:
+ >+ From: Michal Bukovjan [mailto:michal.bukovjan at openone.cz]
+ >
+ >[..]
+ >
+ >+ Sure. That is why property editors exist after all.
+ >+ Just for a record, I studied how it is done in Kylix today.
+ >+ In pursuing compatibility, Borland arrived exactly to what I
+ >+ want to avoid. On their controls, you can set up *only* Color,
+ >+ and Font.Color (as in Windows) and Bitmap, which seems to be
+ >+ new. The problem is, when you use your own colors, there is
+ >+ no way to specify the color of font or background for disabled
+ >+ or mouseover state.
+ >+ So when a user applies the right theme, you get unreadable
+ >+ text or funny looking hover effects (yellow text on yellow
+ >+ background, or gray text on gray background, etc.). I call
+ >+ it plain design flaw.
+ >+
+ >+ I will think about this ExtendedStyle some more :-)
+ >
+ >IMHO, if one is using themes, one should not play with
+ >fonts/colors/bitmaps etc. It should be handled by the theme.
+ >If one still wants to change fonts/colors/bitmaps etc. I call
+ >that a design flaw.
+ >
+ The problem is in the words *one*:


+ one as a developer -
+    a) either leaves default colors/fonts, and application
+ copies theme.
+ Everything is OK. Note that developer is not using themes, it is the
+ widget set that uses themes. All that developer can do is to leave
+ defaults, i.e. use widget set calls to draw (that is the reason for
+ Frame3d, for example).
+    b) wants to have his own skin/colors (like most multimedia players
+ do, for example - xmms, winamp) - no go with Lazarus/Delphi, he can
+ define only some limited aspects

I think it is not a problem of Delphi/Lazarus in the first place. The moment
most developers are going to use their own skins, it results in crappy
interfaces. (I'm using large (non default) fonts on a desert theme myself
and you dont want to know how many apps I've seen with gray parts /
unreadable fonts).

The moment one starts to implement a theme, it is posible with Lazarus. The
only thing is that in the current implementation you can't use the
underlying theme engine. (Again, that can be implemented by dedicated

+ one as a user - can use any theme he wants. Application should either
+ respect the entire theme (which Lazarus does not at the moment, but this
+ is regular bug right now :-) - case a),


+ or define its own *replacement*
+ (i.e. define its *all* colors/fonts on its own), not just a subset -
+ case b) - not possible with Lazarus by design.

I cant see how a user could anyway.

+ With current Delphi-like design, it can be fixed so that we can do a)
+ with Lazarus easily.
+ Without design changes, we will be unable to handle case b).

If you have a dedicated GTKTheme component and don't do any colors or fonts
etc on a form then if case a works, case b works as well.

+ If we choose to ignore case b), or implement later once Lazarus takes
+ over the marketplace, we should state it somewhere so that developers
+ don't bother :-(

At this moment... yes I'll ignore. We can add all features we want, but then
we won't get any further.


More information about the Lazarus mailing list