[Gambas-user] Change in spacing/padding/margin property for Gambas 3

Benoît Minisini gambas at ...1...
Sat Mar 5 03:45:43 CET 2011


Hi,

I am currently changing the behaviour of the Spacing, Padding and Margin 
property to fit requests from Richard Terry, and I'm trying to not break every 
application by doing that.

The old behaviour was:

- If Spacing is TRUE, then child controls are spaced with Desktop.Scale 
pixels.

- If Margin is TRUE, then the container has a margin of Desktop.Scale pixels 
around its children.

- The Padding property is a number of pixels added to the margin.

The new behaviour I propose is the following:

- If Spacing is TRUE, and if Padding is zero, then child controls are spaced 
with Desktop.Scale pixels.

- If Spacing is TRUE, and if Padding is not zero, then child controls are 
spaced with Padding pixels.

- If Margin is TRUE, and if Padding is zero, then the container has a margin 
of Desktop.Scale pixels around its children.

- If Margin is TRUE, and if Padding is not zero, then the container has a 
margin of Padding pixels around its children.

- If Margin is FALSE, and Spacing is FALSE, but Padding is not zero, then the 
container has a margin of Padding pixels around its children. That to be 
compatibie with the old behaviour.

It allows to have pixel precision to spacing and margin, except that then 
spacing and margin both have the same value.

What do you think?

-- 
Benoît Minisini




More information about the User mailing list