diff options
author | nyamatongwe <devnull@localhost> | 2012-07-24 15:29:48 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-07-24 15:29:48 +1000 |
commit | 6728875a9748d11ca2fb92ad36a2e640b03aed38 (patch) | |
tree | 2a8bc6dbfd6213e0f292744e1cc52675ef4303fe /src/CallTip.cxx | |
parent | 28a6b6543584a15ce128408ed523b88c8b588394 (diff) | |
download | scintilla-mirror-6728875a9748d11ca2fb92ad36a2e640b03aed38.tar.gz |
Add ncurses platform. Rest of the implementation is an external project.
From Mitchell Foral.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 9f17e592a..d5ba3bd09 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -18,9 +18,6 @@ using namespace Scintilla; #endif -static const int insetX = 5; // text inset in x from calltip border -static const int widthArrow = 14; - CallTip::CallTip() { wCallTip = 0; inCallTipMode = false; @@ -36,6 +33,11 @@ CallTip::CallTip() { above = false; useStyleCallTip = false; // for backwards compatibility + insetX = 5; + widthArrow = 14; + borderHeight = 2; // Extra line for border and an empty line at top and bottom. + verticalOffset = 1; + #ifdef __APPLE__ // proper apple colours for the default colourBG = ColourDesired(0xff, 0xff, 0xc6); @@ -284,15 +286,15 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, int textHeight, const char * } lineHeight = surfaceMeasure->Height(font); - // Extra line for border and an empty line at top and bottom. The returned + // The returned // rectangle is aligned to the right edge of the last arrow encountered in // the tip text, else to the tip text left edge. - int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; + int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + borderHeight * 2; delete surfaceMeasure; if (above) { - return PRectangle(pt.x - offsetMain, pt.y - 1 - height, pt.x + width - offsetMain, pt.y - 1); + return PRectangle(pt.x - offsetMain, pt.y - verticalOffset - height, pt.x + width - offsetMain, pt.y - verticalOffset); } else { - return PRectangle(pt.x - offsetMain, pt.y + 1 + textHeight, pt.x + width - offsetMain, pt.y + 1 + textHeight + height); + return PRectangle(pt.x - offsetMain, pt.y + verticalOffset + textHeight, pt.x + width - offsetMain, pt.y + verticalOffset + textHeight + height); } } |