MCPcopy
hub / github.com/ZToolsCenter/ZTools / buildThemeInfo

Method buildThemeInfo

src/main/api/plugin/ui.ts:326–339  ·  view source on GitHub ↗

* 构建当前主题信息

()

Source from the content-addressed store, hash-verified

324 * 构建当前主题信息
325 */
326 private buildThemeInfo(): {
327 isDark: boolean
328 primaryColor: string
329 customColor?: string
330 windowMaterial: string
331 } {
332 const settings = databaseAPI.dbGet('settings-general')
333 return {
334 isDark: nativeTheme.shouldUseDarkColors,
335 primaryColor: settings?.primaryColor || 'blue',
336 customColor: settings?.customColor,
337 windowMaterial: windowManager.getWindowMaterial()
338 }
339 }
340
341 /**
342 * 向所有插件视图广播消息

Callers 2

setupIPCMethod · 0.95

Calls 2

dbGetMethod · 0.45
getWindowMaterialMethod · 0.45

Tested by

no test coverage detected