Remove containing box for web view. Fixes #2848

This commit is contained in:
Maurice Parker 2021-03-05 12:45:15 -06:00
parent 035759947a
commit 2ca06eeae7
2 changed files with 1 additions and 49 deletions

View File

@ -63,16 +63,6 @@ final class DetailWebViewController: NSViewController, WKUIDelegate {
}
override func loadView() {
// Wrap the webview in a box configured with the same background color that the web view uses
let box = NSBox(frame: .zero)
box.boxType = .custom
box.isTransparent = true
box.titlePosition = .noTitle
box.contentViewMargins = .zero
box.fillColor = NSColor(named: "webviewBackgroundColor")!
view = box
let preferences = WKPreferences()
preferences.minimumFontSize = 12.0
preferences.javaScriptCanOpenWindowsAutomatically = false
@ -96,7 +86,7 @@ final class DetailWebViewController: NSViewController, WKUIDelegate {
webView.customUserAgent = userAgent
}
box.addSubview(webView)
view = webView
// Use the safe area layout guides if they are available.
if #available(OSX 11.0, *) {

View File

@ -1,38 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "1.000",
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"red" : "0.176",
"alpha" : "1.000",
"blue" : "0.176",
"green" : "0.176"
}
}
}
]
}