Thanks for the quick answer.
This is very complex :) I thought it's just one line of code ;)

I will try it out and if some errors occur I will let you know.

Thanks
Tobias
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Alexander Back
Gesendet: Montag, 1. September 2008 10:20
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] rounded borders

Hi Tobias,

yes, the news article is out-of-date :)

I try to explain the rounded borders stuff at the groupbox widget in 
Modern theme and this should get you the picture to implement it for 
your own widget.

First of all, the decorator you have to choose is the Grid decorator. 
This decorator uses a baseImage to slice this baseImage into 9 parts:
   * top-left, top, top-right
   * left, center, right
   * bottom-left, bottom, bottom-right

You probably never get in touch with these splitted images in any way, 
but I guess it helps a bit to know some internals.

1. Create your baseImage like 
"qooxdoo-sdk/framework/source/resource/source/Modern/groupbox.png"
2. Create a "image.json" file (use the one at 
"qooxdoo/framework/image.json" as template)
3. Create an entry at the "image-clipping" section for your baseImage
The "prefix" entry will set the filename for all of your splitted 
images. The resulting images will follow the rule  "prefix+imagepart" 
where "imagepart" will be e.g. "tl" or "br" (for top-left and bottom-right).

The second entry "border-width" is to define the part of the image which 
the rounded border occupies. If you look at your baseImage you can 
determine the "border-width" by select a rectangle (which your graphic 
tool) which occupies the rounded border completely. For the groupBox 
example the rounded border occupies a space of 4x4 pixels for each edge. 
Just open the "groupBox.png" and take a look for yourself if my 
explanation is good enough :)

4. Run "./generate -c image.json image-clipping" to generate the image 
slices
5. Create a new Grid decorator which uses your baseImage. You do not 
have to deal with the splitted images, just tell the grid decorator to 
use your baseImage. The rest will be magic :)

I hope these steps are complete and will help you to setup a widget with 
rounded borders. If you encounter some issues or glitches let me know. I 
guess I use this explanation as base for the documentation at the wiki :)

cheers,
   Alex



Tobias Koller (GERMO GmbH) wrote:
> Hi lsit,
> 
> how can I create rounded borders?
> 
> I guess this solution is too old ;)
> 
> http://news.qooxdoo.org/2008/02
> 
> thanks
> 
> Tobias

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to