|
Hello everyone.
I've been using the FlowLayout class programatically always aligned to
#left.
Now, when I changed it to #right and the horizontal gap was > 0, I've
noticed that some of the subviews were falling out their container view.
I think there might be something missing in the
FlowLayout>>startOffsetFor:in: method, in this line:
lineWidth := anOrderedCollection inject: 0 into: [:w :each | w + each
width].
In the #flowSplit: mehod the horizontal gap is taken into account, but not
in the above line, sometimes making a portion of the right most subview of a
line going out of bounds.
I changed the line to
lineWidth := anOrderedCollection inject: 0 into: [:w :each | w + each
width + hgap].
and seems to fix the problem, but I'm not sure if this change can have side
effects, or if I missunderstood something.
Regards.
Martin
|