Dark mode support
Centralized all colors, tweaked application paletter in darkmode to make it darker.
This commit is contained in:
parent
aac55b0ed1
commit
86a9a0d709
19 changed files with 335 additions and 73 deletions
|
|
@ -7,11 +7,14 @@ GutterPainter::GutterPainter(CodeEditor *editor, QPaintEvent *event)
|
|||
, painter(editor->gutterArea)
|
||||
, event(event)
|
||||
, fontMetrics(editor->fontMetrics())
|
||||
{}
|
||||
, colorTheme(GetColorTheme())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GutterPainter::Paint()
|
||||
{
|
||||
painter.fillRect(event->rect(), Qt::lightGray);
|
||||
painter.fillRect(event->rect(), colorTheme.gutterBackground);
|
||||
|
||||
LoopState loopState(editor);
|
||||
// We will now loop through all visible lines and paint the line numbers in the
|
||||
|
|
@ -37,7 +40,7 @@ void GutterPainter::Paint()
|
|||
void GutterPainter::drawLineNumber(const LoopState &loopState)
|
||||
{
|
||||
QString number = QString::number(loopState.blockNumber() + 1);
|
||||
painter.setPen(Qt::black);
|
||||
painter.setPen(colorTheme.lineNumber);
|
||||
painter.drawText(0, loopState.top, editor->gutterArea->width(), fontMetrics.height(),
|
||||
Qt::AlignRight, number);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue