Skip to content

Commit c36bf96

Browse files
committed
Padding coherence between html and rtf output mode.
1 parent b5e3261 commit c36bf96

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Application/PreviewView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ class PreviewView: NSView {
158158
textView.maxSize = layoutSize
159159

160160
textView.registerForDraggedTypes([.fileURL])
161+
textView.textContainerInset = CGSize(width: 6, height: 12)
162+
163+
webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")
161164

162165
/*
163166
// Prevent automatic word wrap.

QLExtension/PreviewViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ class PreviewViewController: NSViewController, QLPreviewingController, WKNavigat
197197
textView.isHorizontallyResizable = true
198198
textView.autoresizingMask = []
199199
textView.textContainer?.containerSize = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)
200+
textView.textContainerInset = CGSize(width: 6, height: 12)
201+
200202
textView.textContainer?.widthTracksTextView = false
201203
textView.textContainer?.heightTracksTextView = false
202204
textView.wantsLayer = true

XPCService/SCSHTheme.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ html, body {
929929
height: 100%;
930930
}
931931
body {
932-
padding: 1em;
932+
padding: 12px;
933933
}
934934
.color_code {
935935
\(cssFont)

XPCService/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
html, body {
1010
height: 100%;
1111
margin: 0;
12-
padding: 0;
12+
padding: 6px;
1313
}
1414
pre.hl {
1515
margin: 0;

0 commit comments

Comments
 (0)