[view] add stretch param to TailLayout
This commit is contained in:
@@ -11,7 +11,8 @@ typedef Row = {
|
||||
|
||||
class TailLayout extends DefaultLayout {
|
||||
|
||||
public var rowSize:Int = 0;
|
||||
@:style(0) public var rowSize:Null<Int>;
|
||||
@:style(false) public var stretch:Null<Bool>;
|
||||
|
||||
private function placeRow(group:IGroupView, y:Float, row:Row):Void {
|
||||
var x:Float = (group.width - row.width) / 2;
|
||||
@@ -41,7 +42,7 @@ class TailLayout extends DefaultLayout {
|
||||
setViewHeight(group, view);
|
||||
if (
|
||||
(rowSize > 0 && row.views.length >= rowSize) ||
|
||||
(/*rowSize == 0 && */row.width + view.width + margin + group.geometry.margin.horizontal > size.width)
|
||||
(/*rowSize == 0 && */row.width + view.width + margin + group.geometry.margin.horizontal > size.width && !stretch)
|
||||
) {
|
||||
row.width -= margin;
|
||||
w = Math.max(w, row.width);
|
||||
|
||||
Reference in New Issue
Block a user