mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Add special case for colour picker stroke (#548)
This commit is contained in:
parent
32ec18a6a7
commit
6006f24801
2 changed files with 7 additions and 0 deletions
|
@ -453,6 +453,12 @@ Blockly.BlockSvg.prototype.updateColour = function() {
|
|||
if (this.isShadow() && this.parentBlock_) {
|
||||
// Pull shadow block stroke colour from parent block's tertiary if possible.
|
||||
strokeColour = this.parentBlock_.getColourTertiary();
|
||||
// Special case: if we contain a colour field, set to a special stroke colour.
|
||||
if (this.inputList[0] &&
|
||||
this.inputList[0].fieldRow[0] &&
|
||||
this.inputList[0].fieldRow[0] instanceof Blockly.FieldColour) {
|
||||
strokeColour = Blockly.Colours.colourPickerStroke;
|
||||
}
|
||||
}
|
||||
|
||||
// Render block stroke
|
||||
|
|
|
@ -90,6 +90,7 @@ Blockly.Colours = {
|
|||
"stackGlowOpacity": 1,
|
||||
"replacementGlow": "#FFFFFF",
|
||||
"replacementGlowOpacity": 1,
|
||||
"colourPickerStroke": "#FFFFFF",
|
||||
// CSS colours: support RGBA
|
||||
"fieldShadow": "rgba(0,0,0,0.1)",
|
||||
"dropDownShadow": "rgba(0, 0, 0, .3)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue