kopia lustrzana https://github.com/backface/turtlestitch
migrated make-a-variable dialog
rodzic
67428148a3
commit
1f706d2363
11
src/byob.js
11
src/byob.js
|
@ -1847,7 +1847,6 @@ BlockDialogMorph.prototype.addTypeButton = function (action, label, query) {
|
||||||
button.outlineGradient = this.buttonOutlineGradient;
|
button.outlineGradient = this.buttonOutlineGradient;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
|
|
||||||
button.drawNew();
|
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
this.types.add(button);
|
this.types.add(button);
|
||||||
return button;
|
return button;
|
||||||
|
@ -3839,8 +3838,8 @@ VariableDialogMorph.prototype.fixLayout = function () {
|
||||||
this.padding,
|
this.padding,
|
||||||
th + this.padding
|
th + this.padding
|
||||||
)));
|
)));
|
||||||
this.silentSetWidth(this.body.width() + this.padding * 2);
|
this.bounds.setWidth(this.body.width() + this.padding * 2);
|
||||||
this.silentSetHeight(
|
this.bounds.setHeight(
|
||||||
this.body.height()
|
this.body.height()
|
||||||
+ this.padding * 2
|
+ this.padding * 2
|
||||||
+ th
|
+ th
|
||||||
|
@ -3854,12 +3853,12 @@ VariableDialogMorph.prototype.fixLayout = function () {
|
||||||
|
|
||||||
if (this.types) {
|
if (this.types) {
|
||||||
this.types.fixLayout();
|
this.types.fixLayout();
|
||||||
this.silentSetHeight(
|
this.bounds.setHeight(
|
||||||
this.height()
|
this.height()
|
||||||
+ this.types.height()
|
+ this.types.height()
|
||||||
+ this.padding
|
+ this.padding
|
||||||
);
|
);
|
||||||
this.silentSetWidth(Math.max(
|
this.bounds.setWidth(Math.max(
|
||||||
this.width(),
|
this.width(),
|
||||||
this.types.width() + this.padding * 2
|
this.types.width() + this.padding * 2
|
||||||
));
|
));
|
||||||
|
@ -3873,7 +3872,7 @@ VariableDialogMorph.prototype.fixLayout = function () {
|
||||||
|
|
||||||
if (this.buttons && (this.buttons.children.length > 0)) {
|
if (this.buttons && (this.buttons.children.length > 0)) {
|
||||||
this.buttons.fixLayout();
|
this.buttons.fixLayout();
|
||||||
this.silentSetHeight(
|
this.bounds.setHeight(
|
||||||
this.height()
|
this.height()
|
||||||
+ this.buttons.height()
|
+ this.buttons.height()
|
||||||
+ this.padding
|
+ this.padding
|
||||||
|
|
Ładowanie…
Reference in New Issue