@@ -291,7 +291,7 @@ export class FieldDropdown extends Field<string> {
291291
292292 if ( this . getConstants ( ) ! . FIELD_DROPDOWN_COLOURED_DIV ) {
293293 const primaryColour = block . getColour ( ) ;
294- const borderColour = ( this . sourceBlock_ as BlockSvg ) . style . colourTertiary ;
294+ const borderColour = ( this . sourceBlock_ as BlockSvg ) . getColourTertiary ( ) ;
295295 dropDownDiv . setColour ( primaryColour , borderColour ) ;
296296 }
297297
@@ -467,21 +467,21 @@ export class FieldDropdown extends Field<string> {
467467 * Updates the dropdown arrow to match the colour/style of the block.
468468 */
469469 override applyColour ( ) {
470- const style = ( this . sourceBlock_ as BlockSvg ) . style ;
470+ const sourceBlock = this . sourceBlock_ as BlockSvg ;
471471 if ( this . borderRect_ ) {
472- this . borderRect_ . setAttribute ( 'stroke' , style . colourTertiary ) ;
472+ this . borderRect_ . setAttribute ( 'stroke' , sourceBlock . getColourTertiary ( ) ) ;
473473 if ( this . menu_ ) {
474- this . borderRect_ . setAttribute ( 'fill' , style . colourTertiary ) ;
474+ this . borderRect_ . setAttribute ( 'fill' , sourceBlock . getColourTertiary ( ) ) ;
475475 } else {
476476 this . borderRect_ . setAttribute ( 'fill' , 'transparent' ) ;
477477 }
478478 }
479479 // Update arrow's colour.
480- if ( this . sourceBlock_ && this . arrow ) {
481- if ( this . sourceBlock_ . isShadow ( ) ) {
482- this . arrow . style . fill = style . colourSecondary ;
480+ if ( sourceBlock && this . arrow ) {
481+ if ( sourceBlock . isShadow ( ) ) {
482+ this . arrow . style . fill = sourceBlock . getColourSecondary ( ) ;
483483 } else {
484- this . arrow . style . fill = style . colourPrimary ;
484+ this . arrow . style . fill = sourceBlock . getColour ( ) ;
485485 }
486486 }
487487 }
0 commit comments