Merge pull request #1117 from brollb/1116-dialogboxmorph-buttons-bad-width

Updated bounds after pos change and added btn width check. Fixes #1116
dev
Jens Mönig 2016-05-02 13:02:53 +02:00
commit f18026722f
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -2513,6 +2513,12 @@ DialogBoxMorph.prototype.fixLayout = function () {
+ this.buttons.height() + this.buttons.height()
+ this.padding + this.padding
); );
this.silentSetWidth(Math.max(
this.width(),
this.buttons.width()
+ (2 * this.padding)
)
);
this.buttons.setCenter(this.center()); this.buttons.setCenter(this.center());
this.buttons.setBottom(this.bottom() - this.padding); this.buttons.setBottom(this.bottom() - this.padding);
} }
@ -2927,6 +2933,7 @@ AlignmentMorph.prototype.fixLayout = function () {
)) ))
); );
} }
cfb = c.fullBounds();
newBounds = newBounds.merge(cfb); newBounds = newBounds.merge(cfb);
} else { } else {
newBounds = cfb; newBounds = cfb;