(name: EffectName, options)
| 90 | } |
| 91 | |
| 92 | function 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 | |
| 110 | window.Effect = { |
| 111 |
no test coverage detected