commit 5fdae074f92695e348db872fa1cb33cc6339b9ec
Author: Koji Yokota <[email protected]>
Date: Thu Jun 26 23:28:32 2025 +0900
Fine-tune preedit representation
---
src/frontends/qt/GuiInputMethod.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/frontends/qt/GuiInputMethod.cpp
b/src/frontends/qt/GuiInputMethod.cpp
index 1e305b0b26..47a4f63b88 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -380,7 +380,8 @@ void GuiInputMethod::setPreeditStyle(
char_format.setFontUnderline(true);
start = focus_style->start;
length = (size_type)focus_style->length;
- } else if (!d->is_cjk_locale && !d->preedit_str_.empty()) {
+ } else if (!d->is_cjk_locale && !d->preedit_str_.empty() &&
+ d->style_.segments_.empty()) {
// dead keys on MacOS give no char format having
preedit strings
length = d->preedit_str_.length();
} else
@@ -400,13 +401,6 @@ void GuiInputMethod::setTextFormat(const
QInputMethodEvent::Attribute & it,
{
// get LyX's color setting
QTextCharFormat char_format = it.value.value<QTextCharFormat>();
- QTextCharFormat lyx_cf;
- QBrush fg_brush(guiApp->colorCache().get(Color_foreground));
- QBrush bg_brush(guiApp->colorCache().get(Color_background));
- lyx_cf.setForeground(fg_brush);
- lyx_cf.setBackground(bg_brush);
- // merge into IM's specification (lyx_cf has priority)
- char_format.merge(lyx_cf);
LYXERR(Debug::GUI,
"QInputMethodEvent::TextFormat start: " << it.start <<
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs