diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-01 14:14:45 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-01 14:14:45 +1000 |
commit | 3de73c8508e74834a38f63f5c4584f1fb2012b52 (patch) | |
tree | 9fa739b8d3f2d1a365f923d975f7bf06ff3526bb /src/CallTip.cxx | |
parent | 30808d18f64c63db954cf4b72a879608f0266bd1 (diff) | |
download | scintilla-mirror-3de73c8508e74834a38f63f5c4584f1fb2012b52.tar.gz |
Backport: Add IntegerRectangle to simplify drawing lines without casting.
Backport of changeset 6773:9a027c16f8c3.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index f8bb77c48..21cf6e3d3 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -19,6 +19,7 @@ #include "Scintilla.h" +#include "IntegerRectangle.h" #include "StringCopy.h" #include "Position.h" #include "CallTip.h" @@ -233,13 +234,14 @@ void CallTip::PaintCT(Surface *surfaceWindow) { #ifndef __APPLE__ // OSX doesn't put borders on "help tags" // Draw a raised border around the edges of the window - surfaceWindow->MoveTo(0, static_cast<int>(rcClientSize.bottom) - 1); + const IntegerRectangle ircClientSize(rcClientSize); + surfaceWindow->MoveTo(0, ircClientSize.bottom - 1); surfaceWindow->PenColour(colourShade); - surfaceWindow->LineTo(static_cast<int>(rcClientSize.right) - 1, static_cast<int>(rcClientSize.bottom) - 1); - surfaceWindow->LineTo(static_cast<int>(rcClientSize.right) - 1, 0); + surfaceWindow->LineTo(ircClientSize.right - 1, ircClientSize.bottom - 1); + surfaceWindow->LineTo(ircClientSize.right - 1, 0); surfaceWindow->PenColour(colourLight); surfaceWindow->LineTo(0, 0); - surfaceWindow->LineTo(0, static_cast<int>(rcClientSize.bottom) - 1); + surfaceWindow->LineTo(0, ircClientSize.bottom - 1); #endif } |