Commit c29012fd authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Fixed colors for parameters for some themes

This change hardcodes color values for variable parameter for some of
the themes we have as a special case to provide better highlighting. For
the rest we still use the "Variable" text-style.
parent 5748e432
......@@ -38,12 +38,38 @@ void SemanticHighlighting::themeChange(KTextEditor::Editor *e)
QColor v = QColor::fromRgba(theme.textColor(Style::Variable));
if (!fixedAttrs[1])
fixedAttrs[1] = new KTextEditor::Attribute();
// This is only for function parameter which are not
// directly supported by themes so we load some hard
// coded values here for some of the themes we have
// and for others we just read the "Variable" text-style.
QColor v;
bool italic = false;
static const char MonokaiVP[] = "#fd971f";
static const char DraculaVP[] = "#ffb86c";
static const char AyuDarkLightVP[] = "#a37acc";
static const char AyuMirageVP[] = "#d4bfff";
if ( == QStringLiteral("Monokai")) {
v = QColor(MonokaiVP);
italic = true;
} else if ( == QStringLiteral("Dracula")) {
v = QColor(DraculaVP);
italic = true;
} else if ( == QStringLiteral("ayu Light") || == QStringLiteral("ayu Dark")) {
v = QColor(AyuDarkLightVP);
} else if ( == QStringLiteral("ayu Mirage")) {
v = QColor(AyuMirageVP);
} else {
v = QColor::fromRgba(theme.textColor(Style::Variable));
italic = theme.isItalic(Style::Variable);
QColor c = QColor::fromRgba(theme.textColor(Style::Constant));
if (!fixedAttrs[2])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment