Skip to content

Commit

Permalink
Fix oddities in field_dropdown colours (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings authored Feb 12, 2024
1 parent d8359dd commit 9c526c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/field_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() {
// Update colour to look selected.
if (!this.disableColourChange_) {
if (this.sourceBlock_.isShadow()) {
this.sourceBlock_.setShadowColour(this.sourceBlock_.getColourQuaternary());
this.sourceBlock_.setShadowColour(this.sourceBlock_.getParent().getColourQuaternary());
} else if (this.box_) {
this.box_.setAttribute('fill', this.sourceBlock_.getColourQuaternary());
}
Expand All @@ -265,7 +265,7 @@ Blockly.FieldDropdown.prototype.onHide = function() {
// Update colour to look selected.
if (!this.disableColourChange_ && this.sourceBlock_) {
if (this.sourceBlock_.isShadow()) {
this.sourceBlock_.clearShadowColour();
this.sourceBlock_.setShadowColour(this.sourceBlock_.getParent().getColourSecondary());
} else if (this.box_) {
this.box_.setAttribute('fill', this.sourceBlock_.getColour());
}
Expand Down

0 comments on commit 9c526c8

Please sign in to comment.