gonfunko / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

fix: make dropdown menu shadow block colors consistent #22

Closed gonfunko closed 2 months ago

gonfunko commented 2 months ago

In conjunction with https://github.com/gonfunko/scratch-blocks/pull/152, this PR fixes the appearance of dropdown menus in shadow blocks. When scratch-gui patches block definitions in order to have menu generators which are dependent upon VM state, it had been manually setting the colors to colors exported by scratch-blocks. Instead, we now use the same extension approach that the main block definitions use, which fixes some bugs caused by the inconsistency. This PR also fetches the dropdown field from the registry rather than hardcoding Blockly's in order to bring in a subclass used by scratch-blocks.