Mercurial > cgi-bin > hgweb.cgi > ClipMan
comparison src/name/blackcap/clipman/Main.kt @ 29:c4f53bc01732
Fix searching (and main display).
author | David Barts <n5jrn@me.com> |
---|---|
date | Wed, 29 Jan 2020 14:36:16 -0800 |
parents | f1fcc1281dad |
children | 0c6c18a733b7 |
comparison
equal
deleted
inserted
replaced
28:f1fcc1281dad | 29:c4f53bc01732 |
---|---|
74 val piv = if (html == null) { | 74 val piv = if (html == null) { |
75 PasteboardItemView("Plain text", ClipText().apply { | 75 PasteboardItemView("Plain text", ClipText().apply { |
76 contentType = "text/plain" | 76 contentType = "text/plain" |
77 text = plain | 77 text = plain |
78 font = Font(Font.MONOSPACED, Font.PLAIN, MONO_SIZE) | 78 font = Font(Font.MONOSPACED, Font.PLAIN, MONO_SIZE) |
79 resize() | |
79 }) | 80 }) |
80 } else { | 81 } else { |
81 val (dhtml, style) = preproc(html) | 82 val (dhtml, style) = preproc(html) |
82 val hek = MyEditorKit().apply { | 83 val hek = MyEditorKit().apply { |
83 style.addStyleSheet(defaultStyleSheet) | 84 style.addStyleSheet(defaultStyleSheet) |
84 styleSheet = style | 85 styleSheet = style |
85 } | 86 } |
86 PasteboardItemView("Styled text", ClipText().apply { | 87 PasteboardItemView("Styled text", ClipText().apply { |
87 editorKit = hek | 88 editorKit = hek |
88 text = dhtml | 89 text = dhtml |
90 resize() | |
89 }) | 91 }) |
90 } | 92 } |
91 piv.searchable.addMouseListener(this) | 93 piv.searchable.addMouseListener(this) |
92 queue.v.add(QueueItem(contents, piv)) | 94 queue.v.add(QueueItem(contents, piv)) |
93 oldContents = contents | 95 oldContents = contents |