diff options
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); } } |