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