Skip to content

Commit 850e2c5

Browse files
fix: remove glow theme (#545)
* fix: remove glow theme * chore: set active node colour to match zelos glow colour
1 parent 3124c5e commit 850e2c5

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

src/index.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ export class KeyboardNavigation {
2020
/** Cursor for the main workspace. */
2121
private cursor: Blockly.LineCursor;
2222

23-
/**
24-
* These fields are used to preserve the workspace's initial state to restore
25-
* it when/if keyboard navigation is disabled.
26-
*/
27-
private originalTheme: Blockly.Theme;
28-
2923
/**
3024
* Input mode tracking.
3125
*/
@@ -62,9 +56,6 @@ export class KeyboardNavigation {
6256
this.navigationController.enable(workspace);
6357
this.inputModeTracker = new InputModeTracker(workspace);
6458

65-
this.originalTheme = workspace.getTheme();
66-
this.setGlowTheme();
67-
6859
this.cursor = new Blockly.LineCursor(workspace);
6960

7061
// Add the event listener to enable disabled blocks on drag.
@@ -132,9 +123,6 @@ export class KeyboardNavigation {
132123

133124
// Remove the event listener that enables blocks on drag
134125
this.workspace.removeChangeListener(enableBlocksOnDrag);
135-
136-
this.workspace.setTheme(this.originalTheme);
137-
138126
this.navigationController.dispose();
139127
this.inputModeTracker.dispose();
140128
}
@@ -145,19 +133,4 @@ export class KeyboardNavigation {
145133
toggleShortcutDialog(): void {
146134
this.navigationController.shortcutDialog.toggle(this.workspace);
147135
}
148-
149-
/**
150-
* Update the theme to match the selected glow colour to the cursor
151-
* colour.
152-
*/
153-
setGlowTheme() {
154-
const newTheme = Blockly.Theme.defineTheme('zelosDerived', {
155-
name: 'zelosDerived',
156-
base: Blockly.Themes.Zelos,
157-
componentStyles: {
158-
selectedGlowColour: '#ffa200',
159-
},
160-
});
161-
this.workspace.setTheme(newTheme);
162-
}
163136
}

test/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
}
9292

9393
html {
94-
--blockly-active-node-color: #ffa200;
94+
--blockly-active-node-color: #fff200;
9595
--blockly-active-tree-color: #60a5fa;
9696
--blockly-selection-width: 3px;
9797
}

0 commit comments

Comments
 (0)