diff options
author | nyamatongwe <unknown> | 2012-07-24 15:29:48 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-07-24 15:29:48 +1000 |
commit | b74d888e9d72a7a61295dccfee1f07465f5be867 (patch) | |
tree | fb958dd1e96d6451555c8fdb0730ed7c2d02ca89 /src/CallTip.cxx | |
parent | 124855efe9f3d44625552854cf618a64613fe8c8 (diff) | |
download | scintilla-mirror-b74d888e9d72a7a61295dccfee1f07465f5be867.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); } } |