diff options
author | Markus Nißl <unknown> | 2022-07-22 21:11:33 +1000 |
---|---|---|
committer | Markus Nißl <unknown> | 2022-07-22 21:11:33 +1000 |
commit | 46e54d394dfd76a0d3055850ce8e6f394dfe2ba7 (patch) | |
tree | ae9cdae77833271e4bc7e45ae72e59d0b3048072 | |
parent | 4bfb45aca9a2e2dd181cdd6f5d7823ac3ae72a0e (diff) | |
download | scintilla-mirror-46e54d394dfd76a0d3055850ce8e6f394dfe2ba7.tar.gz |
Bug [#2341] Stop including STYLE_CALLTIP when calculating line height.
-rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index fb3a45cc8..5d30b807a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -593,6 +593,11 @@ <a href="https://sourceforge.net/p/scintilla/bugs/2338/">Bug #2338</a>. </li> <li> + Stop including STYLE_CALLTIP when calculating line height. + Allows a large font to be used for calltips without affecting text display. + <a href="https://sourceforge.net/p/scintilla/bugs/2341/">Bug #2341</a>. + </li> + <li> Fix incorrect display of selection when printing in some modes. <a href="https://sourceforge.net/p/scintilla/bugs/2335/">Bug #2335</a>. </li> diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 44ca8e59b..25a5f9cad 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -711,10 +711,15 @@ FontRealised *ViewStyle::Find(const FontSpecification &fs) { } void ViewStyle::FindMaxAscentDescent() noexcept { - for (const auto &font : fonts) { - if (maxAscent < font.second->measurements.ascent) - maxAscent = font.second->measurements.ascent; - if (maxDescent < font.second->measurements.descent) - maxDescent = font.second->measurements.descent; + for (size_t i = 0; i < styles.size(); i++) { + if (i == StyleCallTip) + continue; + + const auto &style = styles[i]; + + if (maxAscent < style.ascent) + maxAscent = style.ascent; + if (maxDescent < style.descent) + maxDescent = style.descent; } } |