[haiku-development] Re: Set*UIColor Version 3 Patch

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 7 Nov 2015 11:01:11 +0100

Hi looncraz,

Am 07.11.2015 um 00:40 schrieb looncraz:

I'd agree, but I'm under the impression that we don't have the luxury
of adding virtual methods freely and maintaining backwards
compatibility. If that's not the case, then these should absolutely
be virtual, and I'd have BControl and others override
AdoptSystemColors() so calling them won't mess with the intended
drawing (LowColor should always match the parent view color).

We only have four virtual slots left in BView. So as long as the methods
that are calling AdoptSystemColors() are documented, and can be
overridden, I would prefer to keep your status quo regardings their
virtual status.

Yes, but there is literally no other place it can be done more
appropriately, and it enables the top view to update with layout view
colors (which, usually, will be system colors, but may be custom
colors [previously not possible]).

I'd doubt that :-)
Haiku added the layout API, and we're free to solve things cleanly here.
If an application that uses the layout API does not work correctly, it
surely can be fixed, too.

Definitely no quick fix, my first shot at full fontaware -ness,
though, showed that it may well be possible to create a generic
solution. I am looking at building a ratio-based view positioning
and sizing snapshot that can be used to resize even legacy,
closed-source, programs more or less properly. Not sure how well it
will work, I have some experiments to run ;-)

It works rather well with layouts, but not perfectly - and window
sizing still has some issues.

Due to how this will only properly work with certain apps, and
possibly poorly with others, I am building a blacklist system that
will allow blacklisting apps, or specific windows/views in an app.

I'd only automatically resize applications that are using the layout
API. Everything else should only act manually - I don't see how a
blacklist is needed there.

To properly resize apps using the layout API, however, the spacing constants must be evaluated at layout computation time, not when the values are set, as it is now.

Bye,
Axel.

Other related posts: