فهرست منبع

fix internal viewer in dark mode

marinofaggiana 5 سال پیش
والد
کامیت
2793955b9c
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      iOSClient/Viewer/NCViewerDocumentWeb.swift

+ 6 - 1
iOSClient/Viewer/NCViewerDocumentWeb.swift

@@ -73,7 +73,12 @@ class NCViewerDocumentWeb: NSObject {
         let webView = WKWebView(frame: CGRect(x: 0, y: 0, width: Int(detail.view.bounds.size.width), height: Int(detail.view.bounds.size.height) - Int(k_detail_Toolbar_Height) - safeAreaBottom - 1), configuration: configuration)
         webView.navigationDelegate = self
         webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-        webView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
+        if CCUtility.getDarkMode() {
+            webView.backgroundColor = .lightGray
+        } else {
+            webView.backgroundColor = .white
+        }
+        
         webView.isOpaque = false
         
         if fileNameExtension == "CSS" || fileNameExtension == "PY" || fileNameExtension == "XML" || fileNameExtension == "JS" {