Skip to content

Commit

Permalink
Merge pull request #89 from jeddict/feature
Browse files Browse the repository at this point in the history
Resolve Dark Theme Look and Feel Rendering Issue
  • Loading branch information
jGauravGupta authored Feb 25, 2025
2 parents daff6d9 + 4b5b18b commit ea2d64b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public JEditorPane createHtmlPane(String content) {
public JEditorPane createPane() {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
editorPane.setBackground(Color.WHITE);
// editorPane.setBackground(Color.YELLOW);
parentPanel.add(editorPane);
return editorPane;
}
Expand Down Expand Up @@ -857,7 +857,7 @@ private HTMLEditorKit getHTMLEditorKit() {
StyleSheet styleSheet = htmlEditorKit.getStyleSheet();
styleSheet.addRule("html { font-family: sans-serif; line-height: 1.15; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }");
styleSheet.addRule("article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { display: block; }");
styleSheet.addRule("body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: left; background-color: #fff; }");
styleSheet.addRule("body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: left;}");
styleSheet.addRule("hr { box-sizing: content-box; height: 0; overflow: visible; }");
styleSheet.addRule("h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; }");
styleSheet.addRule("p { margin-top: 0; margin-bottom: 1rem; }");
Expand Down

0 comments on commit ea2d64b

Please # to comment.