MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / applyWindowEffectWin

Function applyWindowEffectWin

plugins/src/preload/api/Effect.ts:92–108  ·  view source on GitHub ↗
(name: EffectName, options)

Source from the content-addressed store, hash-verified

90}
91
92function applyWindowEffectWin(name: EffectName, options) {
93 if (name in WinBackdropType) {
94 if (name === 'mica') {
95 const material = String(options.material || 'mica')
96 if (material in Win11MicaMaterial) {
97 native.SetWindowVibrancy(WinBackdropType.mica, Win11MicaMaterial[material])
98 } else {
99 console.warn('Unsupported mica material: %s', material)
100 }
101 } else {
102 const color = parseHexColor(options.color)
103 native.SetWindowVibrancy(WinBackdropType[name], color)
104 }
105 } else {
106 console.warn('Unknown window visual effect: %s', name)
107 }
108}
109
110window.Effect = {
111

Callers 1

applyFunction · 0.85

Calls 1

parseHexColorFunction · 0.85

Tested by

no test coverage detected