forked from qt-creator/qt-creator
Editor: do not hardcode default colors for function search result
Using white and black as the defaults results in unpleasant colors in a dark color scheme. Instead rely on the fallback to the colors of C_TEXT that are used in the SearchResultColor constructor. Change-Id: I110aadbae9f07f59fefac07c7ef8fa2af2f3b596 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -350,8 +350,6 @@ QColor FormatDescription::defaultForeground(TextStyle id)
|
|||||||
return QColor(0x00, 0x00, 0x33);
|
return QColor(0x00, 0x00, 0x33);
|
||||||
} else if (id == C_SEARCH_RESULT_ALT2) {
|
} else if (id == C_SEARCH_RESULT_ALT2) {
|
||||||
return QColor(0x33, 0x00, 0x00);
|
return QColor(0x33, 0x00, 0x00);
|
||||||
} else if (id == C_SEARCH_RESULT_CONTAINING_FUNCTION) {
|
|
||||||
return Qt::black;
|
|
||||||
}
|
}
|
||||||
return QColor();
|
return QColor();
|
||||||
}
|
}
|
||||||
@@ -368,8 +366,6 @@ QColor FormatDescription::defaultBackground(TextStyle id)
|
|||||||
return QColor(0xb6, 0xcc, 0xff);
|
return QColor(0xb6, 0xcc, 0xff);
|
||||||
} else if (id == C_SEARCH_RESULT_ALT2) {
|
} else if (id == C_SEARCH_RESULT_ALT2) {
|
||||||
return QColor(0xff, 0xb6, 0xcc);
|
return QColor(0xff, 0xb6, 0xcc);
|
||||||
} else if (id == C_SEARCH_RESULT_CONTAINING_FUNCTION) {
|
|
||||||
return Qt::white;
|
|
||||||
} else if (id == C_PARENTHESES) {
|
} else if (id == C_PARENTHESES) {
|
||||||
return QColor(0xb4, 0xee, 0xb4);
|
return QColor(0xb4, 0xee, 0xb4);
|
||||||
} else if (id == C_PARENTHESES_MISMATCH) {
|
} else if (id == C_PARENTHESES_MISMATCH) {
|
||||||
|
|||||||
Reference in New Issue
Block a user