Skip to content

Commit 7c2b046

Browse files
authored
Add text color support for dropdown menu
1 parent 6815b62 commit 7c2b046

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

core/field_dropdown.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,19 @@ Blockly.FieldDropdown.prototype.init = function() {
152152
}, null);
153153
this.fieldGroup_.insertBefore(this.box_, this.textElement_);
154154
}
155+
155156
// Force a reset of the text to add the arrow.
156157
var text = this.text_;
157158
this.text_ = null;
158159
this.setText(text);
160+
161+
if (this.sourceBlock_.textColour) {
162+
this.textElement_.style.setProperty(
163+
"fill",
164+
this.sourceBlock_.textColour,
165+
"important"
166+
);
167+
}
159168
};
160169

161170
/**

0 commit comments

Comments
 (0)