diff options
author | Neil <nyamatongwe@gmail.com> | 2021-09-12 17:15:34 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-09-12 17:15:34 +1000 |
commit | e1a52e49814cb1ab2efcdbd65dcb9a83976c2a54 (patch) | |
tree | c811e2fdd4f46e0dc955d71fba87a4f46e65be40 /src/EditView.cxx | |
parent | 3d017cb655c23d9dfb39cbecbcaddaf14bb25117 (diff) | |
download | scintilla-mirror-e1a52e49814cb1ab2efcdbd65dcb9a83976c2a54.tar.gz |
Make negative settings for extra ascent and descent safer by ensuring calculated
ascent and thus line height is at least 1 pixel.
Allow 1 point font minimum instead of 2 as this may help with document maps.
Document negative extra ascent and descent.
Use XYPOSITION for ascent and descent for more coherent types and fewer casts
but floor the values when retrieving from Surface so behaviour is unchanged.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 0f69dd7b3..732a0f72e 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2700,7 +2700,7 @@ Sci::Position EditView::FormatRange(bool draw, const RangeToFormat *pfr, Surface vsPrint.styles[StyleLineNumber].font.get(), number); surface->FlushCachedState(); surface->DrawTextNoClip(rcNumber, vsPrint.styles[StyleLineNumber].font.get(), - static_cast<XYPOSITION>(ypos + vsPrint.maxAscent), number, + ypos + vsPrint.maxAscent, number, vsPrint.styles[StyleLineNumber].fore, vsPrint.styles[StyleLineNumber].back); } |