On Sun, 01 Apr 2012 18:40:57 +0300 Tom Hacohen <[email protected]> said:

> Hey,
> 
> Look at this piece of code: http://pastebin.com/1Ai8htsS
> 
> Shouldn't the first button be twice the size of the second one? Because 
> it isn't...

no. weight controls the amount of EXTRA SPACE divided up. so subtract min size
from each button (40) and then it is exactly that ratio. extra space is space
given above and BEYOND the minimum size (of all widgets involved). its
massively simpler algorithmically this way. it always works the exact same way.
doing what you  "want" can be done if widgets had a 0 min size. if they dont
try this:

window is 90 pixels high (min size of each button is 40). so ok. lets split
this up into a ratio of 2:1. button 1 gets 30, button 2 gets 60. ummm ...
BREAK. 30 < 40. now what? so we have to take 10 from button 2 (or those that
are expanded beyond their min size - why pays the price? how do we divide that
over 20 other widgets in a box?), so you have then 40 and 50. wrong ratio.
complain again. :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to