mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-22 02:52:38 +00:00
DolphinQt: Adjust panel-specific colors and syntax highlighting for dark theme.
This commit is contained in:
parent
887b07af71
commit
521d6e93c7
8 changed files with 97 additions and 28 deletions
|
@ -6,6 +6,8 @@
|
|||
#include <optional>
|
||||
#include <thread>
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHeaderView>
|
||||
|
@ -38,7 +40,6 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
// TODO: Make sure these functions return colors that will be visible in the current theme.
|
||||
QTextCharFormat GetSpecialCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
|
@ -49,7 +50,10 @@ QTextCharFormat GetSpecialCharFormat()
|
|||
QTextCharFormat GetLiteralCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
format.setForeground(QBrush{Qt::darkMagenta});
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setForeground(QBrush{QColor(171, 132, 219)});
|
||||
else
|
||||
format.setForeground(QBrush{Qt::darkMagenta});
|
||||
return format;
|
||||
}
|
||||
|
||||
|
@ -57,35 +61,50 @@ QTextCharFormat GetInvalidCharFormat()
|
|||
{
|
||||
QTextCharFormat format;
|
||||
format.setUnderlineStyle(QTextCharFormat::WaveUnderline);
|
||||
format.setUnderlineColor(Qt::darkRed);
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setUnderlineColor(QColor(255, 69, 0));
|
||||
else
|
||||
format.setUnderlineColor(Qt::darkRed);
|
||||
return format;
|
||||
}
|
||||
|
||||
QTextCharFormat GetControlCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
format.setForeground(QBrush{Qt::darkGreen});
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setForeground(QBrush{QColor(0, 220, 0)});
|
||||
else
|
||||
format.setForeground(QBrush{Qt::darkGreen});
|
||||
return format;
|
||||
}
|
||||
|
||||
QTextCharFormat GetVariableCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
format.setForeground(QBrush{Qt::darkYellow});
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setForeground(QBrush{QColor(226, 226, 0)});
|
||||
else
|
||||
format.setForeground(QBrush{Qt::darkYellow});
|
||||
return format;
|
||||
}
|
||||
|
||||
QTextCharFormat GetBarewordCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
format.setForeground(QBrush{Qt::darkBlue});
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setForeground(QBrush{QColor(66, 138, 255)});
|
||||
else
|
||||
format.setForeground(QBrush{Qt::darkBlue});
|
||||
return format;
|
||||
}
|
||||
|
||||
QTextCharFormat GetCommentCharFormat()
|
||||
{
|
||||
QTextCharFormat format;
|
||||
format.setForeground(QBrush{Qt::darkGray});
|
||||
if (Settings::Instance().IsThemeDark())
|
||||
format.setForeground(QBrush{QColor(176, 176, 176)});
|
||||
else
|
||||
format.setForeground(QBrush{Qt::darkGray});
|
||||
return format;
|
||||
}
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue