From 485c33da9073758af6f7c23d91a38bc9445e476f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sun, 3 May 2020 16:25:38 +0200 Subject: [PATCH] improved category button rendering for flat mode "make-a-block" dialog --- src/byob.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/byob.js b/src/byob.js index 9963e1ea..2696964f 100644 --- a/src/byob.js +++ b/src/byob.js @@ -108,7 +108,7 @@ BooleanSlotMorph, XML_Serializer, SnapTranslator*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2020-April-28'; +modules.byob = '2020-May-03'; // Declarations @@ -1666,8 +1666,8 @@ BlockDialogMorph.prototype.createCategoryButtons = function () { BlockDialogMorph.prototype.addCategoryButton = function (category) { var labelWidth = 75, colors = [ - SpriteMorph.prototype.paletteColor, - SpriteMorph.prototype.paletteColor.darker(50), + IDE_Morph.prototype.frameColor, + IDE_Morph.prototype.frameColor.darker(MorphicPreferences.isFlat ? 5 : 50), SpriteMorph.prototype.blockColor[category] ], button; @@ -1700,6 +1700,9 @@ BlockDialogMorph.prototype.addCategoryButton = function (category) { button.labelShadowOffset = new Point(-1, -1); button.labelShadowColor = colors[1]; button.labelColor = IDE_Morph.prototype.buttonLabelColor; + if (MorphicPreferences.isFlat) { + button.labelPressColor = new Color(255, 255, 255); + } button.contrast = this.buttonContrast; button.fixLayout(); button.refresh();