Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: Highlight selected part of preedit using platform theme palette
QInputMethodEvent::Selection unfortunately doesn't apply to the preedit text, and QInputMethodEvent::Cursor which does, doesn't support setting a selection. Until we've introduced attributes that allow us to propagate the preedit selection semantically we resort to styling the selection via the TextFormat attribute, so that the preedit selection is visible to the user. This allows us to remove the fallback we had for thick and double underline styles, where we mapped those to the wiggly underline style. This was needed to distinguish the selected cluster when composing CJK, but looked out of place. One disadvantage of faking the selection via text format is that we will not update the selection color on theme change, e.g. when switching from light to dark mode, but this is a minor issue that we can live with until we've introduced a proper QInputMethodEvent attribute for the preedit selection. Pick-to: 6.2 Change-Id: I1c45c310107697962e328a4db908d29d2358f756 Reviewed-by: Volker Hilsheimer <[email protected]>
- Loading branch information