Added
- Custom-painted editors can use the input method again (#999). New
ContainerCfg.AcceptsTextInputmarks a focusable container as an editable
text area. While it holds focus, Go-Gui starts the platform input method
(IME), the same as it does forInput. Since v0.65.0 (#393) the input method
started only for widgets with a built-in text shape. Editors that draw their
text on aDrawCanvas, such as go-edit and go-term, hold focus on a container
instead, so they never got it. On every platform, CJK and other composing
input methods could not type into them. Set the field on the editor's focus
container, and set it to false while the editor is read-only.
Changed
- Markdown paragraph text uses the body size (#998).
DefaultMarkdownStyle()now sets paragraphs, emphasis and table cells to
TextStyleBody(14 in the dark and light themes), notTextStyleBodySmall
(12). Markdown is document text, and at 12 it looked like secondary text next
to the rest of the UI. Nobody chose the smaller size: it was left over from
the old numbered type scale. The headings move with it: H4 is body bold, H5 is
TextStyleBodySmallbold, H6 isTextStyleCaptionbold. H3 and H4 are now
the same size, because the ladder has only two sizes above body. Inline code
usesTextStyleCode(body + 1 for the mono face). Fenced code blocks stay on
TextStyleCodeSmall, so fewer long lines wrap. To keep the old size, set the
fields on the style you pass inMarkdownCfg.Style.
Fixed
- A
MarkdownCfgwith noStylerenders with the default style (#998).
Before, the zero style went to the renderer as it was. Text runs had size 0,
so go-glyph guessed a size. List bullets drew at a different size from their
text. Blocks had no spacing between them. Blockquotes had no bar and code
blocks had no background. An unsetStyle(zeroText.Size) now resolves to
DefaultMarkdownStyle()for the active theme. ACodeHighlighterset on an
otherwise empty style is kept; any other field set on a style with a zero
Text.Sizeis ignored, so start fromDefaultMarkdownStyle()to change a
few.
What's Changed
Other changes
- fix(markdown): paragraph text at Body, default an unset MarkdownCfg.Style (#998) by @mike-ward in #1001
- fix(gui): ContainerCfg.AcceptsTextInput starts the IME for custom editors (#999) by @mike-ward in #1002
- changelog: add v0.88.0 (AcceptsTextInput, markdown defaults) by @mike-ward in #1003
Full Changelog: v0.87.0...v0.88.0