adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: GUI border and background


From: Kai Sterker
Subject: [Adonthell-devel] Re: GUI border and background
Date: Thu, 12 Aug 2010 21:49:08 +0200

On Wed, Aug 11, 2010 at 1:55 PM, Kai Sterker <address@hidden> wrote:

> Late yesterday night I got guitest up and running again. There's one
> little bug with the cursor of text input fields, which somehow has the
> wrong y-offset. I also have not updated the focus code, so for now we
> still have the plain border as focus indicator instead of the
> decorative overlay. So there is a bit more work to put in, including
> formatting and properly documenting the code. But I think I'll check
> in an intermediate version tonight, since I don't want to risk losing
> all the many changes I made and debugged :-).

Stuff is checked in, but I fear there is still a lot more work left to
be done. Anyway, first some aspects on how to use it:

The background image can have an alpha channel, and that's the only
way to get a translucent background. Due to the caching involved,
setting the surface alpha will not work so easily.

The corner and border images OTOH shouldn't have an alpha channel.
Instead, they can use the infamous cyan to mask certain areas that
will later become transparent. That is so because it simplifies
composition of the widget decoration. The widget is first filled with
the background, then the borders are painted along the edges and
finally the corner pieces are added to the ... corners.

If all the corners are equal, as they used to be in v0.3, one image is
enough. It can be referenced multiple times in the widget decoration
xml. Same if the borders are symmetrical. Then one horizontal and one
vertical piece is enough. But we could have 4 different corners and
different borders for each side of the widget. So get creative!


Now some more things that need to be done:

* I need to actually test the border code and implement better focus indication.
* Also finish the API doc and clean up the API as such.

I was also thinking about making a "window" object, that is kind of a
layout but also knows it's own position. But in a way I think it might
be redundant. Would be better if the window manager knows about widget
position. All UI elements we implement are windows in a way, like the
dialogue window. They can directly extend widget and do not need a
specific "window" class.


Anyway, that will have to happen next week.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]