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

TextEditor: Default to Text style on style absence

The current default is black foreground, which is invisible on dark color

Change-Id: Id9dbc6ac7377816666887096c28fa0008291ddac
Reviewed-by: default avatarDavid Schulz <>
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 =; const TextStyle id =;
if (!m_scheme.contains(id)) { if (!m_scheme.contains(id)) {
Format format; Format format;
if (desc.format() == format && m_scheme.contains(C_TEXT)) {
format = m_scheme.formatFor(C_TEXT); // Default format -> Text
} else {
format.setForeground(desc.foreground()); format.setForeground(desc.foreground());
format.setBackground(desc.background()); 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