Dark mode support

Centralized all colors, tweaked application paletter in darkmode to make it darker.
This commit is contained in:
eelke 2025-02-23 08:32:15 +01:00
parent aac55b0ed1
commit 86a9a0d709
19 changed files with 335 additions and 73 deletions

View file

@ -2,25 +2,28 @@
#include "catalog/PgTypeContainer.h"
#include "SqlLexer.h"
#include "util/Colors.h"
SqlSyntaxHighlighter::SqlSyntaxHighlighter(QTextDocument *parent)
: QSyntaxHighlighter(parent)
{
m_keywordFormat.setForeground(QColor(32, 32, 192));
m_keywordFormat.setFontWeight(QFont::Bold);
const ColorTheme& theme = GetColorTheme();
m_commentFormat.setForeground(QColor(128, 128, 128));
m_keywordFormat.setForeground(theme.keyword);
m_keywordFormat.setFontWeight(QFont::Bold);
m_quotedStringFormat.setForeground(QColor(192, 32, 192));
m_commentFormat.setForeground(theme.comment);
m_quotedIdentifierFormat.setForeground(QColor(192, 128, 32));
m_quotedStringFormat.setForeground(theme.quotedString);
m_typeFormat.setForeground(QColor(32, 192, 32));
m_quotedIdentifierFormat.setForeground(theme.quotedIdentifier);
m_typeFormat.setForeground(theme.type);
m_typeFormat.setFontWeight(QFont::Bold);
m_parameterFormat.setForeground(QColor(192, 32, 32));
m_parameterFormat.setForeground(theme.parameter);
m_parameterFormat.setFontWeight(QFont::Bold);
}