TextEditor: Improve default color mechanism in FormatDescription

Required for providing defaults for non-existent entries that should
fall-back to text.

Change-Id: I8ce33257a55cf173a5e9b904b7da6326163b4261
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-06-19 10:46:49 +03:00
committed by Orgad Shaneh
parent 9577eb72b4
commit ac931e19d5
3 changed files with 29 additions and 33 deletions

View File

@@ -363,8 +363,8 @@ bool FontSettings::loadColorScheme(const QString &fileName,
if (!m_scheme.contains(id)) {
Format format;
const Format &descFormat = desc.format();
format.setForeground(desc.foreground());
format.setBackground(desc.background());
format.setForeground(descFormat.foreground());
format.setBackground(descFormat.background());
format.setBold(descFormat.bold());
format.setItalic(descFormat.italic());
format.setUnderlineColor(descFormat.underlineColor());