blockly > blockRendering > ConstantProvider > setTheme
طريقة blockRendering.ConstantProvider.setTheme()
إعادة تحميل خصائص الثوابت التي تعتمد على المظهر.
Signature:
setTheme(theme: Theme): void;
المعلمات
المعلمة |
النوع |
الوصف |
مظهر |
المظهر |
مظهر مساحة العمل الحالي |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 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"]]