From ad788a770e22a1f7b1bf7c57dd25beabb7cc2388 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 21 Jul 2020 12:03:34 +0200 Subject: [PATCH] tweaked default mode colors to slightly darker --- HISTORY.md | 1 + src/blocks.js | 3 ++- src/gui.js | 21 +++++++-------------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 531c9ce9..db53f3d3 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ ### 2020-07-21 * blocks: tweaked block highlights for fade-out * widgets, gui: tweaked scripts tab for fade-out +* blocks, gui: tweaked default mode colors to slightly darker ### 2020-07-20 * objects: fixed a list-watcher direct-editing offset bug diff --git a/src/blocks.js b/src/blocks.js index 60be3e9d..a62dcf33 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -6596,7 +6596,8 @@ ScriptsMorph.prototype.render = function (aContext) { }; ScriptsMorph.prototype.getRenderColor = function () { - if (MorphicPreferences.isFlat) { + if (MorphicPreferences.isFlat || + SyntaxElementMorph.prototype.alpha > 0.85) { return this.color; } return this.color.mixed( diff --git a/src/gui.js b/src/gui.js index bde61297..3644c411 100644 --- a/src/gui.js +++ b/src/gui.js @@ -110,7 +110,7 @@ IDE_Morph.uber = Morph.prototype; IDE_Morph.prototype.setDefaultDesign = function () { MorphicPreferences.isFlat = false; - SpriteMorph.prototype.paletteColor = new Color(35, 35, 35); + SpriteMorph.prototype.paletteColor = new Color(30, 30, 30); SpriteMorph.prototype.paletteTextColor = new Color(230, 230, 230); StageMorph.prototype.paletteTextColor = SpriteMorph.prototype.paletteTextColor; @@ -195,10 +195,10 @@ IDE_Morph.prototype.scriptsTexture = function () { for (i = 0; i < 100; i += 4) { ctx.fillStyle = this.frameColor.toString(); ctx.fillRect(i, 0, 1, 100); - ctx.fillStyle = this.groupColor.lighter(4).toString(); + ctx.fillStyle = this.groupColor.lighter(2).toString(); ctx.fillRect(i + 1, 0, 1, 100); ctx.fillRect(i + 3, 0, 1, 100); - ctx.fillStyle = this.groupColor.toString(); + ctx.fillStyle = this.groupColor.darker(2).toString(); ctx.fillRect(i + 2, 0, 1, 100); } return pic; @@ -1173,6 +1173,7 @@ IDE_Morph.prototype.createCategories = function () { this.categories = new Morph(); this.categories.color = this.groupColor; this.categories.bounds.setWidth(this.paletteWidth); + this.categories.getRenderColor = ScriptsMorph.prototype.getRenderColor; function addCategoryButton(category) { var labelWidth = 75, @@ -1535,7 +1536,8 @@ IDE_Morph.prototype.createSpriteBar = function () { tab.labelColor = this.buttonLabelColor; tab.getPressRenderColor = function () { - if (MorphicPreferences.isFlat) { + if (MorphicPreferences.isFlat || + SyntaxElementMorph.prototype.alpha > 0.85) { return this.pressColor; } return this.pressColor.mixed( @@ -1794,16 +1796,7 @@ IDE_Morph.prototype.createCorral = function () { this.corral = new Morph(); this.corral.color = this.groupColor; - - this.corral.getRenderColor = function () { - if (MorphicPreferences.isFlat) { - return this.color; - } - return this.color.mixed( - Math.max(SyntaxElementMorph.prototype.alpha - 0.15, 0), - SpriteMorph.prototype.paletteColor - ); - }; + this.corral.getRenderColor = ScriptsMorph.prototype.getRenderColor; this.add(this.corral);