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 | f4c9e005de319d79fffae89e2695eb3d27005e85 (patch) | |
tree | c6dff56c891aa8eb33b0d659b4f5d39e20d6d80c /src/CallTip.cxx | |
parent | 086549b12567da2e3750dd7d45ff0f42bb5cb620 (diff) | |
download | scintilla-mirror-f4c9e005de319d79fffae89e2695eb3d27005e85.tar.gz |
Add IntegerRectangle to simplify drawing lines without casting.
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 } |