comparison src/name/blackcap/exifwasher/HelpDialog.kt @ 56:224572069e36

Always define an editor kit, so we always get HTML mode.
author davidb
date Thu, 07 May 2020 17:12:25 -0700
parents 40911898ed23
children 94cd2d486adc
comparison
equal deleted inserted replaced
55:f5faf70c7d10 56:224572069e36
50 return super.getStyleSheet() 50 return super.getStyleSheet()
51 } 51 }
52 } 52 }
53 53
54 private val helpPane = JScrollPane(JTextPane().also { 54 private val helpPane = JScrollPane(JTextPane().also {
55 UIManager.getFont("Panel.font")?.let { pFont -> 55 it.editorKit = MyEditorKit().also { ek ->
56 it.editorKit = MyEditorKit().also { ek -> 56 UIManager.getFont("Panel.font")?.let { pFont ->
57 ek.styleSheet = StyleSheet().apply { 57 ek.styleSheet = StyleSheet().apply {
58 addRule("body { font-family: \"${pFont.family}\"; font-size: ${pFont.size}; }") 58 addRule("body { font-family: \"${pFont.family}\"; font-size: ${pFont.size}; }")
59 addStyleSheet(ek.defaultStyleSheet) 59 addStyleSheet(ek.defaultStyleSheet)
60 } 60 }
61 } 61 }