Remove containing box for web view. Fixes #2848
This commit is contained in:
parent
035759947a
commit
2ca06eeae7
@ -63,16 +63,6 @@ final class DetailWebViewController: NSViewController, WKUIDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func loadView() {
|
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()
|
let preferences = WKPreferences()
|
||||||
preferences.minimumFontSize = 12.0
|
preferences.minimumFontSize = 12.0
|
||||||
preferences.javaScriptCanOpenWindowsAutomatically = false
|
preferences.javaScriptCanOpenWindowsAutomatically = false
|
||||||
@ -96,7 +86,7 @@ final class DetailWebViewController: NSViewController, WKUIDelegate {
|
|||||||
webView.customUserAgent = userAgent
|
webView.customUserAgent = userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
box.addSubview(webView)
|
view = webView
|
||||||
|
|
||||||
// Use the safe area layout guides if they are available.
|
// Use the safe area layout guides if they are available.
|
||||||
if #available(OSX 11.0, *) {
|
if #available(OSX 11.0, *) {
|
||||||
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user