From 71750dd67732a7dfefbb0a4c20cc6a04d1e7604c Mon Sep 17 00:00:00 2001 From: Steven Huang <140762048+shuang886@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:11:00 -0800 Subject: [PATCH] actually activate the visual effect --- .../Sources/CandidateUI/HorizontalCandidateController.swift | 4 ++-- .../Sources/CandidateUI/VerticalCandidateController.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/CandidateUI/Sources/CandidateUI/HorizontalCandidateController.swift b/Packages/CandidateUI/Sources/CandidateUI/HorizontalCandidateController.swift index fe43b890..b7b0b03d 100644 --- a/Packages/CandidateUI/Sources/CandidateUI/HorizontalCandidateController.swift +++ b/Packages/CandidateUI/Sources/CandidateUI/HorizontalCandidateController.swift @@ -228,11 +228,11 @@ public class HorizontalCandidateController: CandidateController { let effect = NSVisualEffectView(frame: NSRect(x: 0, y: 0, width: 0, height: 0)) effect.blendingMode = .behindWindow if #available(macOS 10.14, *) { - effect.material = .contentBackground + effect.material = .popover } else { effect.material = .appearanceBased } - effect.wantsLayer = true + effect.state = .active effect.maskImage = .mask(withCornerRadius: 4) panel.contentView = effect diff --git a/Packages/CandidateUI/Sources/CandidateUI/VerticalCandidateController.swift b/Packages/CandidateUI/Sources/CandidateUI/VerticalCandidateController.swift index 56583120..b9305bd6 100644 --- a/Packages/CandidateUI/Sources/CandidateUI/VerticalCandidateController.swift +++ b/Packages/CandidateUI/Sources/CandidateUI/VerticalCandidateController.swift @@ -106,11 +106,11 @@ public class VerticalCandidateController: CandidateController { let effect = NSVisualEffectView(frame: NSRect(x: 0, y: 0, width: 0, height: 0)) effect.blendingMode = .behindWindow if #available(macOS 10.14, *) { - effect.material = .contentBackground + effect.material = .popover } else { effect.material = .appearanceBased } - effect.wantsLayer = true + effect.state = .active effect.maskImage = .mask(withCornerRadius: 4) panel.contentView = effect