Skip to content

Commit

Permalink
Allow forcing links to be always underlined.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 19, 2021
1 parent 5a9878b commit d819971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/basic.style
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ TextPalette {
selectLinkFg: color;
selectMonoFg: color;
selectOverlay: color;
linkAlwaysActive: int;
}

TextStyle {
Expand Down
5 changes: 4 additions & 1 deletion ui/text/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,10 @@ class Renderer {
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;
}
Expand Down

0 comments on commit d819971

Please sign in to comment.