blockly > blockRendering > ConstantProvider >
setTheme
Método blockRendering.ConstantProvider.setTheme()
Atualizar propriedades de constantes que dependem do tema.
Signature:
setTheme(theme: Theme): void;
Parâmetros
Parâmetro |
Tipo |
Descrição |
tema |
Tema |
O tema atual do espaço de trabalho. |
Retorna:
void
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2024-08-29 UTC.
[null,null,["Última atualização 2024-08-29 UTC."],[[["The `blockRendering.ConstantProvider.setTheme()` method updates the constant properties of a block rendering based on the provided theme."],["This method accepts a single parameter, `theme`, which is an instance of the `Theme` class representing the current workspace theme."],["Calling `setTheme()` ensures that visual elements of blocks are aligned with the active theme, maintaining consistency in the workspace appearance."]]],["The `setTheme()` method within the `ConstantProvider` class updates constant properties based on the workspace's current theme. It accepts a `Theme` object as input, which dictates the visual styles. This method does not return any value. Its purpose is to refresh the rendering constants when the workspace theme is changed.\n"]]