summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2018-10-30 13:30:10 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-10-30 16:04:39 +0000
commitb39a5083751605e2ba781393b6b8ea69381efdf4 (patch)
treee00389588b15f35f284043d9376cc8b5fc2de5fc
parent1f22eadf5b3cdbcaebd3524ce9920d9df552d45c (diff)
Fix background of composition text
The Chromium API has been changed: https://chromium-review.googlesource.com/c/chromium/src/+/959006/ Task-number: QTBUG-70289 Task-number: QTBUG-71453 Change-Id: Ib20a82bd826d8067aa3eb3bccccda7d8716e20ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--src/core/render_widget_host_view_qt.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 0bb28bd37..1582cf733 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1235,13 +1235,12 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
end = qMax(0, start + end);
}
- QTextCharFormat format = qvariant_cast<QTextFormat>(attribute.value).toCharFormat();
+ underlines.push_back(ui::ImeTextSpan(ui::ImeTextSpan::Type::kComposition, start, end, ui::ImeTextSpan::Thickness::kThin, SK_ColorTRANSPARENT));
- QColor underlineColor(0, 0, 0, 0);
+ QTextCharFormat format = qvariant_cast<QTextFormat>(attribute.value).toCharFormat();
if (format.underlineStyle() != QTextCharFormat::NoUnderline)
- underlineColor = format.underlineColor();
+ underlines.back().underline_color = toSk(format.underlineColor());
- underlines.push_back(ui::ImeTextSpan(ui::ImeTextSpan::Type::kComposition, start, end, ui::ImeTextSpan::Thickness::kThin, toSk(underlineColor), SK_ColorTRANSPARENT));
break;
}
case QInputMethodEvent::Cursor: