Allow forcing links to be always underlined.

This commit is contained in:
John Preston 2021-09-19 12:41:44 +03:00
parent 5a9878bea9
commit d81997194e
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@ TextPalette {
selectLinkFg: color;
selectMonoFg: color;
selectOverlay: color;
linkAlwaysActive: int;
}
TextStyle {

View file

@ -2018,7 +2018,10 @@ private:
const auto flags = block->flags();
const auto usedFont = [&] {
if (const auto index = block->lnkIndex()) {
return ClickHandler::showAsActive(_t->_links.at(index - 1))
const auto active = ClickHandler::showAsActive(
_t->_links.at(index - 1)
) || (_textPalette && _textPalette->linkAlwaysActive > 0);
return active
? _t->_st->linkFontOver
: _t->_st->linkFont;
}