diff --git a/Evergreen/MainWindow/Detail/ArticleRenderer.swift b/Evergreen/MainWindow/Detail/ArticleRenderer.swift index 58d846622..975cf26e4 100644 --- a/Evergreen/MainWindow/Detail/ArticleRenderer.swift +++ b/Evergreen/MainWindow/Detail/ArticleRenderer.swift @@ -453,7 +453,7 @@ class ArticleRenderer { """ - s += "\n\n\n\n" + s += "\n\n\n\n" s += RSMacroProcessor.renderedText(withTemplate: template(), substitutions: substitutions(), macroStart: "[[", macroEnd: "]]") diff --git a/Evergreen/MainWindow/Detail/DetailViewController.swift b/Evergreen/MainWindow/Detail/DetailViewController.swift index 5e0e70e9e..cf45c0804 100644 --- a/Evergreen/MainWindow/Detail/DetailViewController.swift +++ b/Evergreen/MainWindow/Detail/DetailViewController.swift @@ -249,11 +249,11 @@ final class DetailContainerView: NSView { weak var viewController: DetailViewController? = nil - private var didConfigureLayer = false - - override var wantsUpdateLayer: Bool { - return true - } +// private var didConfigureLayer = false +// +// override var wantsUpdateLayer: Bool { +// return true +// } var contentView: NSView? { didSet { @@ -278,17 +278,21 @@ final class DetailContainerView: NSView { viewController?.viewDidEndLiveResize() } - override func updateLayer() { - - guard !didConfigureLayer else { - return - } - if let layer = layer { - let color = appDelegate.currentTheme.color(forKey: "MainWindow.Detail.backgroundColor") - layer.backgroundColor = color.cgColor - didConfigureLayer = true - } + override func draw(_ dirtyRect: NSRect) { + NSColor.textBackgroundColor.setFill() + dirtyRect.fill() } +// override func updateLayer() { +// +// guard !didConfigureLayer else { +// return +// } +// if let layer = layer { +// let color = appDelegate.currentTheme.color(forKey: "MainWindow.Detail.backgroundColor") +// layer.backgroundColor = color.cgColor +// didConfigureLayer = true +// } +// } } // MARK: - diff --git a/Evergreen/MainWindow/Detail/styleSheet.css b/Evergreen/MainWindow/Detail/styleSheet.css index 8f636c4fe..966f25145 100644 --- a/Evergreen/MainWindow/Detail/styleSheet.css +++ b/Evergreen/MainWindow/Detail/styleSheet.css @@ -1,6 +1,4 @@ body { - color: #444; - background-color: white; margin-top: 20px; margin-bottom: 64px; margin-left: 64px; @@ -8,30 +6,53 @@ body { font-family: -apple-system; font-size: 18px; } + a { text-decoration: none; } -a, a:link, a:visited { - color: #416ED2; -} a:hover { text-decoration: underline; } - +.feedlink { + font-weight: bold; +} .headerTable { width: 100%; height: 68px; +} + +/* Light mode */ + +body.light { + color: -webkit-text; + background-color: -apple-system-text-background; +} + +body.light a, body.light a:link, body.light a:visited { + color: -apple-system-blue; +} +body.light .headerTable { border-bottom: 1px solid rgba(0, 0, 0, 0.1); } +/* Dark mode */ + +body.dark { + color: #d2d2d2; + background-color: #2d2d2d; +} +body.dark a, body.dark a:link, body.dark a:visited { + color: #4490e2; +} +body.dark .headerTable { + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + .header a:link, .header a:visited { color: rgba(0, 0, 0, 0.3); } .header { color: rgba(0, 0, 0, 0.3); } -.feedlink { - font-weight: bold; -} .feedlink a:link, .feedlink a:visited { color: rgba(0, 0, 0, 0.6); }