diff --git a/snap.html b/snap.html
index cc17f97f..2bc937f3 100755
--- a/snap.html
+++ b/snap.html
@@ -8,7 +8,6 @@
-
diff --git a/src/blocks.js b/src/blocks.js
index 0f83dccb..72f0e94c 100644
--- a/src/blocks.js
+++ b/src/blocks.js
@@ -13484,6 +13484,8 @@ ScriptFocusMorph.prototype.reactToKeyEvent = function (key) {
}
};
+
+/*
// register examples with the World demo menu
// comment out to shave off a millisecond loading speed ;-)
@@ -13556,3 +13558,4 @@ ScriptFocusMorph.prototype.reactToKeyEvent = function (key) {
]
]);
})();
+*/
diff --git a/src/morphic.js b/src/morphic.js
index f090ed3c..05f2e16a 100644
--- a/src/morphic.js
+++ b/src/morphic.js
@@ -1178,7 +1178,7 @@
/*global window, HTMLCanvasElement, FileReader, Audio, FileList, Map*/
-var morphicVersion = '2020-February-20';
+var morphicVersion = '2020-February-26';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = true;
@@ -8401,7 +8401,7 @@ StringMorph.prototype.font = function () {
this.fontStyle;
};
-StringMorph.prototype.fixLayout = function () {
+StringMorph.prototype.fixLayout = function (justMe) {
// determine my extent depending on my current settings
var width,
shadowOffset = this.shadowOffset || new Point(),
@@ -8421,7 +8421,7 @@ StringMorph.prototype.fixLayout = function () {
);
// notify my parent of layout change
- if (this.parent) {
+ if (!justMe && this.parent) {
if (this.parent.fixLayout) {
this.parent.fixLayout();
}
diff --git a/src/symbols.js b/src/symbols.js
index 7af3670c..96f256a8 100644
--- a/src/symbols.js
+++ b/src/symbols.js
@@ -163,7 +163,8 @@ SymbolMorph.prototype.toString = function () {
this.constructor.toString().split(' ')[1].split('(')[0]) +
': "' +
this.name +
- '"';
+ '" ' +
+ this.bounds;
};
// SymbolMorph zebra coloring:
@@ -1819,6 +1820,7 @@ SymbolMorph.prototype.renderSymbolList = function (ctx, color) {
ctx.fillRect(0, 0, w, h);
};
+/*
// register examples with the World demo menu
// comment out to shave off a millisecond loading speed ;-)
@@ -1841,3 +1843,4 @@ SymbolMorph.prototype.renderSymbolList = function (ctx, color) {
])
]);
})();
+*/
diff --git a/src/widgets.js b/src/widgets.js
index b42b86dd..9fd66053 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -183,6 +183,7 @@ PushButtonMorph.prototype.init = function (
PushButtonMorph.prototype.fixLayout = function () {
// make sure I at least encompass my label
if (this.label !== null) {
+ this.updateLabelColors();
var padding = this.padding * 2 + this.outline * 2 + this.edge * 2;
this.bounds.setWidth(
Math.max(this.label.width(), this.labelMinExtent.x) + padding
@@ -466,6 +467,18 @@ PushButtonMorph.prototype.createLabel = function () {
this.add(this.label);
};
+PushButtonMorph.prototype.updateLabelColors = function () {
+ var shading = !MorphicPreferences.isFlat || this.is3D;
+ if (this.label) {
+ this.label.color = this.labelColor;
+ if (shading) {
+ this.label.shadowOffset = this.labelShadowOffset;
+ this.label.shadowColor = this.labelShadowColor;
+ }
+ this.label.fixLayout(true); // just me
+ }
+};
+
// PushButtonMorph states
PushButtonMorph.prototype.disable = function () {
@@ -658,8 +671,11 @@ ToggleButtonMorph.prototype.refresh = function () {
ToggleButtonMorph.prototype.fixLayout = function () {
if (this.label !== null) {
- var lw = Math.max(this.label.width(), this.labelMinExtent.x),
- padding = this.padding * 2 + this.outline * 2 + this.edge * 2;
+ var padding = this.padding * 2 + this.outline * 2 + this.edge * 2,
+ lw;
+
+ this.updateLabelColors();
+ lw = Math.max(this.label.width(), this.labelMinExtent.x);
this.bounds.setWidth(this.minWidth ?
Math.max(this.minWidth, lw) + padding
: lw + padding