From baf8cac967b6927992e6c59cc742c8a7d3ebc893 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 12 Sep 2018 10:03:35 +0200 Subject: Fix colorization of change numbers in VCS annotations (like git blame) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Syntax highlighters get information on which text char format they should set, which is not necessarily equivalent with the resulting color in the editor. Currently the only way to explicitly get the color, is through the global text editor settings. Fix-up of 601eebd832e8f8a39d661031a44d5ee3c53bf718 Task-number: QTCREATORBUG-21041 Change-Id: I8fb6e79500d490438b2ccd27b162a3b80822c1ee Reviewed-by: André Hartmann Reviewed-by: Friedemann Kleint Reviewed-by: David Schulz --- src/plugins/vcsbase/baseannotationhighlighter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcsbase/baseannotationhighlighter.cpp b/src/plugins/vcsbase/baseannotationhighlighter.cpp index b95fe6a179..6b3154ab27 100644 --- a/src/plugins/vcsbase/baseannotationhighlighter.cpp +++ b/src/plugins/vcsbase/baseannotationhighlighter.cpp @@ -25,6 +25,7 @@ #include "baseannotationhighlighter.h" #include +#include #include #include @@ -63,8 +64,10 @@ public: void BaseAnnotationHighlighterPrivate::updateOtherFormats() { - m_background = q->formatForCategory(TextEditor::C_TEXT) - .brushProperty(QTextFormat::BackgroundBrush).color(); + m_background = TextEditor::TextEditorSettings::fontSettings() + .toTextCharFormat(TextEditor::C_TEXT) + .brushProperty(QTextFormat::BackgroundBrush) + .color(); q->setChangeNumbers(m_changeNumberMap.keys().toSet()); } -- cgit v1.2.3