Commit 2c3f3970 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent aface7b1
...@@ -320,8 +320,12 @@ bool FontSettings::loadColorScheme(const QString &fileName, ...@@ -320,8 +320,12 @@ bool FontSettings::loadColorScheme(const QString &fileName,
const TextStyle id = desc.id(); const TextStyle id = desc.id();
if (!m_scheme.contains(id)) { if (!m_scheme.contains(id)) {
Format format; Format format;
format.setForeground(desc.foreground()); if (desc.format() == format && m_scheme.contains(C_TEXT)) {
format.setBackground(desc.background()); format = m_scheme.formatFor(C_TEXT); // Default format -> Text
} else {
format.setForeground(desc.foreground());
format.setBackground(desc.background());
}
format.setBold(desc.format().bold()); format.setBold(desc.format().bold());
format.setItalic(desc.format().italic()); format.setItalic(desc.format().italic());
format.setUnderlineColor(desc.format().underlineColor()); format.setUnderlineColor(desc.format().underlineColor());
......
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