封鎖 >blockRendering >ConstantProvider >setTheme
blockRendering.ConstantProvider.setTheme() 方法
重新整理依附主題的常數屬性。
Signature:
setTheme(theme: Theme): void;
參數
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[null,null,["上次更新時間:2024-08-29 (世界標準時間)。"],[[["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"]]