From ec7244be5ceb336e1a7abb90a943f9cbd74b5af5 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 6 Dec 2014 09:13:12 +1100 Subject: Prevent overlapping text with calltip. From Mitchell Foral. --- doc/ScintillaHistory.html | 4 ++++ src/ScintillaBase.cxx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 757c38a6d..6acd62794 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -482,6 +482,10 @@ Released 2 December 2014.
  • + When the calltip window is taller than the Scintilla window, leave it in a + position that avoids overlapping the Scintilla text. +
  • +
  • Reverted a fix on Qt where Qt 5.3 has returned to the behaviour of 4.x. Bug #1575.
  • diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index f9d70ce53..43284f177 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -449,12 +449,12 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { PRectangle rcClient = GetClientRectangle(); int offset = vs.lineHeight + static_cast(rc.Height()); // adjust so it displays above the text. - if (rc.bottom > rcClient.bottom) { + if (rc.bottom > rcClient.bottom && rc.Height() < rcClient.Height()) { rc.top -= offset; rc.bottom -= offset; } // adjust so it displays below the text. - if (rc.top < rcClient.top) { + if (rc.top < rcClient.top && rc.Height() < rcClient.Height()) { rc.top += offset; rc.bottom += offset; } -- cgit v1.2.3