forked from qt-creator/qt-creator
TextEditor: Default to Text style on style absence
The current default is black foreground, which is invisible on dark color schemes. Change-Id: Id9dbc6ac7377816666887096c28fa0008291ddac Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
aface7b1d6
commit
2c3f3970d5
@@ -320,8 +320,12 @@ bool FontSettings::loadColorScheme(const QString &fileName,
|
||||
const TextStyle id = desc.id();
|
||||
if (!m_scheme.contains(id)) {
|
||||
Format format;
|
||||
format.setForeground(desc.foreground());
|
||||
format.setBackground(desc.background());
|
||||
if (desc.format() == format && m_scheme.contains(C_TEXT)) {
|
||||
format = m_scheme.formatFor(C_TEXT); // Default format -> Text
|
||||
} else {
|
||||
format.setForeground(desc.foreground());
|
||||
format.setBackground(desc.background());
|
||||
}
|
||||
format.setBold(desc.format().bold());
|
||||
format.setItalic(desc.format().italic());
|
||||
format.setUnderlineColor(desc.format().underlineColor());
|
||||
|
Reference in New Issue
Block a user