DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2843
Version: 1.3-feature
It seems to me that "space evenly" action would be more useful if distance
between all pairs of widgets would be the same. At the moment one space
can be different from another in one pixel and this inequality is
appreciable when distance is small. Of course, in general case last widget
will change its position for a few pixels, but I think one can consider it
as advantage even. But I understand it is quite disputable issue. I like
to have the same distance via one click and here is my very short
solution.
Link: http://www.fltk.org/str.php?L2843
Version: 1.3-feature
--- fltk/fluid/align_widget.cxx
+++ fltk/fluid/align_widget.cxx
@@ -264,6 +264,7 @@
n--;
if (n>0)
{
+ wdt = wdt/n*n;
int cnt = 0, wsum = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())
@@ -307,6 +308,7 @@
n--;
if (n>0)
{
+ hgt = hgt/n*n;
int cnt = 0, hsum = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev