- fix: editor's font style shouldn't affect gutter's font style
This commit is contained in:
parent
8599190d13
commit
b3fb9e223b
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
||||||
Version 0.6.4
|
Version 0.6.4
|
||||||
- fix: code completion popup not show after '->' inputted
|
- fix: code completion popup not show after '->' inputted
|
||||||
- fix: font styles in the color scheme settings not in effect
|
- fix: font styles in the color scheme settings not in effect
|
||||||
|
- fix: editor's font style shouldn't affect gutter's font style
|
||||||
|
|
||||||
Version 0.6.3
|
Version 0.6.3
|
||||||
- fix: should use c++ syntax to check ".h" files
|
- fix: should use c++ syntax to check ".h" files
|
||||||
|
|
|
@ -200,19 +200,19 @@ PColorSchemeItem ColorSchemeItem::fromJson(const QJsonObject &json)
|
||||||
item->setBold(false);
|
item->setBold(false);
|
||||||
}
|
}
|
||||||
if (json.contains("italic") && json["italic"].isBool()) {
|
if (json.contains("italic") && json["italic"].isBool()) {
|
||||||
item->setBold(json["italic"].toBool());
|
item->setItalic(json["italic"].toBool());
|
||||||
} else {
|
} else {
|
||||||
item->setItalic(false);
|
item->setItalic(false);
|
||||||
}
|
}
|
||||||
if (json.contains("underlined") && json["underlined"].isBool()) {
|
if (json.contains("underlined") && json["underlined"].isBool()) {
|
||||||
item->setBold(json["underlined"].toBool());
|
item->setUnderlined(json["underlined"].toBool());
|
||||||
} else {
|
} else {
|
||||||
item->setUnderlined(false);
|
item->setUnderlined(false);
|
||||||
}
|
}
|
||||||
if (json.contains("strikeout") && json["strikeout"].isBool()) {
|
if (json.contains("strikeout") && json["strikeout"].isBool()) {
|
||||||
item->setBold(json["strikeout"].toBool());
|
item->setStrikeout(json["strikeout"].toBool());
|
||||||
} else {
|
} else {
|
||||||
item->setUnderlined(false);
|
item->setStrikeout(false);
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,13 @@ void SynEditTextPainter::paintGutter(const QRect& clip)
|
||||||
|
|
||||||
if (edit->mGutter.useFontStyle()) {
|
if (edit->mGutter.useFontStyle()) {
|
||||||
painter->setFont(edit->mGutter.font());
|
painter->setFont(edit->mGutter.font());
|
||||||
|
} else {
|
||||||
|
QFont newFont = painter->font();
|
||||||
|
newFont.setBold(false);
|
||||||
|
newFont.setItalic(false);
|
||||||
|
newFont.setStrikeOut(false);
|
||||||
|
newFont.setUnderline(false);
|
||||||
|
painter->setFont(newFont);
|
||||||
}
|
}
|
||||||
if (edit->mGutter.textColor().isValid()) {
|
if (edit->mGutter.textColor().isValid()) {
|
||||||
painter->setPen(edit->mGutter.textColor());
|
painter->setPen(edit->mGutter.textColor());
|
||||||
|
|
Loading…
Reference in New Issue