[haiku-development] Re: 18pt font GUI test

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 08 Jun 2007 22:53:09 +0200

On 2007-06-08 at 19:44:18 [+0200], Ryan Leavengood <leavengood@xxxxxxxxx> 
> On 6/8/07, Łukasz 'Sil2100' Zemczak <sil2100@xxxxxxxxxxxxx> wrote:
> >
> > Since I already did some font sensitivity patches in the past, I am
> > currently working on the Time preferences application to fix its font
> > issues in my free time (not much, but enough for my font sensitivity
> > obsession ;-)). Stefano mentioned to me about the layout system API a
> > while back, but I didn't have the time to look at it closer.
> This is why I want to get this article out. The biggest problem with
> the layout system is people don't know about it or how to use it.
> > Is using the layout system the preferred method for such tasks, or can
> > it be done 'the old way'? Another thing would be whether I should also
> > use this API in the PackageInstaller, or is it that it just doesn't make
> > any difference?
> In my experience so far, using the layout system results in better
> code: it is easier to read and add to and seems to be less code than
> when handling font issues manually. Actually there are several nice
> builders that make GUI generation easier in general. Ingo did a good
> job on this.
> So the point is I really think we should start using the layout system
> wherever it is needed. I'm sure it would be useful in the
> PackageInstaller.

While I'd also like to encourage people to start using it (and ideally give 
some feedback), let me at least add a disclaimer: Besides missing 
archivability and some polishing the framework itself is done, but not all 
of the BView derived classes have been adjusted to be "layout-friendly" 
yet. In most cases that should be a relatively easy task consisting of 
adding one or more constructors that don't take the typical frame rectangle 
and resizing flags, and, where necessary, implement the methods to report 
the min/max/preferred size constraints.

I've recently started a small test app 
(src/tests/kits/interface/layout/widget_layout_test/), that allows to check 
whether individual widget classes behave correctly and I'm slowly working 
my way through this list of classes, adjusting them accordingly. I'd gladly 
accept assistence.

> Stephan also asked me about this, so I will put a priority on getting
> this article out and finishing some of my changes in the code to use
> the layout system (currently just the screensaver preferences.)
> Even though there is already a layout test application, I was also
> thinking of writing a small app which will help clarify how the layout
> system works and what its various parameters are. I will probably call
> it Playout :)

Nice. :-) My test app is really just an app testing the various concepts 
and features. A more demoable sample-code-like app would be much 

CU, Ingo

Other related posts: