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 /src | |
parent | 4bfb45aca9a2e2dd181cdd6f5d7823ac3ae72a0e (diff) | |
download | scintilla-mirror-46e54d394dfd76a0d3055850ce8e6f394dfe2ba7.tar.gz |
Bug [#2341] Stop including STYLE_CALLTIP when calculating line height.
Diffstat (limited to 'src')
-rw-r--r-- | src/ViewStyle.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
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; } } |