mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(macos): resolve webchat panel corner clipping (#22458)
Co-authored-by: apethree <3081182+apethree@users.noreply.github.com> Co-authored-by: agisilaos <3073709+agisilaos@users.noreply.github.com>
This commit is contained in:
@@ -316,7 +316,12 @@ final class WebChatSwiftUIWindowController {
|
||||
let controller = NSViewController()
|
||||
let effectView = NSVisualEffectView()
|
||||
effectView.material = .sidebar
|
||||
effectView.blendingMode = .behindWindow
|
||||
effectView.blendingMode = switch presentation {
|
||||
case .panel:
|
||||
.withinWindow
|
||||
case .window:
|
||||
.behindWindow
|
||||
}
|
||||
effectView.state = .active
|
||||
effectView.wantsLayer = true
|
||||
effectView.layer?.cornerCurve = .continuous
|
||||
@@ -328,6 +333,7 @@ final class WebChatSwiftUIWindowController {
|
||||
}
|
||||
effectView.layer?.cornerRadius = cornerRadius
|
||||
effectView.layer?.masksToBounds = true
|
||||
effectView.layer?.backgroundColor = NSColor.clear.cgColor
|
||||
|
||||
effectView.translatesAutoresizingMaskIntoConstraints = true
|
||||
effectView.autoresizingMask = [.width, .height]
|
||||
@@ -335,6 +341,9 @@ final class WebChatSwiftUIWindowController {
|
||||
|
||||
hosting.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
hosting.view.wantsLayer = true
|
||||
hosting.view.layer?.cornerCurve = .continuous
|
||||
hosting.view.layer?.cornerRadius = cornerRadius
|
||||
hosting.view.layer?.masksToBounds = true
|
||||
hosting.view.layer?.backgroundColor = NSColor.clear.cgColor
|
||||
|
||||
controller.addChild(hosting)
|
||||
|
||||
Reference in New Issue
Block a user