From 4fad29bf15457220982c534301db8ef22a65a006 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 8 Jan 2019 14:52:14 -0800 Subject: [PATCH] Fixes problem with hat style --- tests/blocks/test_blocks.js | 5 +---- theme/classic.js | 4 ++++ theme/highcontrast.js | 6 ++++++ theme/modern.js | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/blocks/test_blocks.js b/tests/blocks/test_blocks.js index f094b1131..3a092309d 100644 --- a/tests/blocks/test_blocks.js +++ b/tests/blocks/test_blocks.js @@ -435,10 +435,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "type": "styled_event_cap", "message0": "Hat block (event)", "nextStatement": null, - "colour": 330, - "style": { - "hat": "cap" - } + "style": "hat_blocks" }, { "type": "block_colour_hex1", diff --git a/theme/classic.js b/theme/classic.js index 0e8c05944..4a5dc7566 100644 --- a/theme/classic.js +++ b/theme/classic.js @@ -56,6 +56,10 @@ var defaultBlockStyles = { }, "variable_dynamic_blocks":{ "primaryColour": "310" + }, + "hat_blocks":{ + "primaryColour":"330", + "hat":"cap" } }; diff --git a/theme/highcontrast.js b/theme/highcontrast.js index 99e152338..3f6f2e8a2 100644 --- a/theme/highcontrast.js +++ b/theme/highcontrast.js @@ -73,6 +73,12 @@ var defaultBlockStyles = { "primaryColour": "#880e4f", "secondaryColour":"#FF73BE", "tertiaryColour":"#FFD4EB" + }, + "hat_blocks" : { + "primaryColour": "#880e4f", + "secondaryColour":"#FF73BE", + "tertiaryColour":"#FFD4EB", + "hat": "cap" } }; diff --git a/theme/modern.js b/theme/modern.js index 2aa9e48c5..6bf823b3a 100644 --- a/theme/modern.js +++ b/theme/modern.js @@ -73,6 +73,12 @@ var defaultBlockStyles = { "primaryColour": "#a55b99", "secondaryColour": "#dbbdd6", "tertiaryColour": "#84497a" + }, + "hat_blocks": { + "primaryColour": "#a55b99", + "secondaryColour": "#dbbdd6", + "tertiaryColour": "#84497a", + "hat": "cap" } };