diff --git a/demos/custom-fields/pitch/field_pitch.js b/demos/custom-fields/pitch/field_pitch.js index 3d3621030..cf3b9fd7f 100644 --- a/demos/custom-fields/pitch/field_pitch.js +++ b/demos/custom-fields/pitch/field_pitch.js @@ -88,9 +88,8 @@ CustomFields.FieldPitch.prototype.showEditor_ = function() { var editor = this.dropdownCreate_(); Blockly.DropDownDiv.getContentDiv().appendChild(editor); - var border = this.sourceBlock_.getColourBorder(); - border = border.colourBorder || border.colourLight; - Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), border); + Blockly.DropDownDiv.setColour(this.sourceBlock_.style.colourPrimary, + this.sourceBlock_.style.colourTertiary); Blockly.DropDownDiv.showPositionedByField( this, this.dropdownDispose_.bind(this)); diff --git a/demos/custom-fields/turtle/field_turtle.js b/demos/custom-fields/turtle/field_turtle.js index ddce28417..374ba5b6c 100644 --- a/demos/custom-fields/turtle/field_turtle.js +++ b/demos/custom-fields/turtle/field_turtle.js @@ -337,10 +337,8 @@ CustomFields.FieldTurtle.prototype.showEditor_ = function() { // These allow us to have the editor match the block's colour. var fillColour = this.sourceBlock_.getColour(); - // This is technically a package function, meaning it could change. - var borderColours = this.sourceBlock_.getColourBorder(); - var borderColour = borderColours.colourBorder || borderColours.colourDark; - Blockly.DropDownDiv.setColour(fillColour, borderColour); + Blockly.DropDownDiv.setColour(fillColour, + this.sourceBlock_.style.colourTertiary); // Always pass the dropdown div a dispose function so that you can clean // up event listeners when the editor closes. @@ -483,9 +481,8 @@ CustomFields.FieldTurtle.prototype.updateColour = function() { var fillColour = isShadow ? this.sourceBlock_.getColourShadow() : this.sourceBlock_.getColour(); // This is technically a package function, meaning it could change. - var borderColours = this.sourceBlock_.getColourBorder(); var borderColour = isShadow ? fillColour : - borderColours.colourBorder || borderColours.colourDark; + this.sourceBlock_.style.colourTertiary; var child = this.turtleGroup_.firstChild; while(child) {