forked from qt-creator/qt-creator
Editor: Calculate annotation color based on editor color scheme
Amends 9182d4eda7
Fixes: QTCREATORBUG-24644
Change-Id: Id34bfbc4ea3d1102835c7c1cf3afa1580dff01d8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "textmark.h"
|
||||
|
||||
#include "fontsettings.h"
|
||||
#include "textdocument.h"
|
||||
#include "texteditor.h"
|
||||
#include "texteditorplugin.h"
|
||||
@@ -139,8 +141,10 @@ void TextMark::paintAnnotation(QPainter &painter, QRectF *annotationRect,
|
||||
const QColor &markColor = m_color.has_value()
|
||||
? Utils::creatorTheme()->color(m_color.value()).toHsl()
|
||||
: painter.pen().color();
|
||||
|
||||
const FontSettings &fontSettings = m_baseTextDocument->fontSettings();
|
||||
const AnnotationColors &colors = AnnotationColors::getAnnotationColors(
|
||||
markColor, painter.background().color());
|
||||
markColor, fontSettings.toTextCharFormat(C_TEXT).background().color());
|
||||
|
||||
painter.save();
|
||||
QLinearGradient grad(rects.fadeInRect.topLeft() - contentOffset,
|
||||
|
Reference in New Issue
Block a user