Commit 72e9afd8 authored by Eike Ziller's avatar Eike Ziller

Fix underline color in diff description when hovering

Since e.g. whitespace can have a different foreground color than
"normal" text, we have to explicitly set the color for the underline
when hovering. Use foreground color if there is no specific text color
set for "normal" text.

Change-Id: I9825d24af0d598b039a0db9ed86966605e22ac04
Reviewed-by: Jaroslaw Kobus's avatarJarek Kobus <>
parent e829ca8e
......@@ -34,6 +34,7 @@
#include <coreplugin/minisplitter.h>
#include <texteditor/displaysettings.h>
#include <texteditor/fontsettings.h>
#include <texteditor/marginsettings.h>
#include <texteditor/syntaxhighlighter.h>
#include <texteditor/textdocument.h>
......@@ -198,7 +199,9 @@ void DescriptionEditorWidget::highlightCurrentContents()
QTextEdit::ExtraSelection sel;
sel.cursor = m_currentCursor;;
const QColor textColor = TextEditorSettings::fontSettings().formatFor(C_TEXT).foreground();
sel.format.setUnderlineColor(textColor.isValid() ? textColor : palette().color(QPalette::Foreground));
QList<QTextEdit::ExtraSelection>() << sel);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment