forked from qt-creator/qt-creator
Fix colorization of change numbers in VCS annotations (like git blame)
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 601eebd832
Task-number: QTCREATORBUG-21041
Change-Id: I8fb6e79500d490438b2ccd27b162a3b80822c1ee
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "baseannotationhighlighter.h"
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QColor>
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user