aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2022-03-04 08:17:07 +1100
committerZufu Liu <unknown>2022-03-04 08:17:07 +1100
commit66a542ff4f184ef10990c2dbaa0877cfe3a493bc (patch)
treef0c94e29748a8e1d08b0b1a4815519487621f145 /src/ScintillaBase.cxx
parentc4600877277ae062a7543dba4521591ede7adc54 (diff)
downloadscintilla-mirror-66a542ff4f184ef10990c2dbaa0877cfe3a493bc.tar.gz
Feature [feature-requests:#1432] Simplify CallTipStart by passing in surface and
font. This allows customization of surface creation and ensures surface and font for calltip are the same as used in main window.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 566a55a3c..979a8b07f 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -465,22 +465,20 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) {
// StyleDefault for the face name, size and character set. Also use it
// for the foreground and background colour.
const int ctStyle = ct.UseStyleCallTip() ? StyleCallTip : StyleDefault;
+ const Style &style = vs.styles[ctStyle];
if (ct.UseStyleCallTip()) {
- ct.SetForeBack(vs.styles[StyleCallTip].fore, vs.styles[StyleCallTip].back);
+ ct.SetForeBack(style.fore, style.back);
}
if (wMargin.Created()) {
pt = pt + GetVisibleOriginInMain();
}
+ AutoSurface surfaceMeasure(this);
PRectangle rc = ct.CallTipStart(sel.MainCaret(), pt,
vs.lineHeight,
defn,
- vs.styles[ctStyle].fontName,
- vs.styles[ctStyle].sizeZoomed,
CodePage(),
- vs.styles[ctStyle].characterSet,
- vs.technology,
- vs.localeName.c_str(),
- wMain);
+ surfaceMeasure,
+ style.font);
// If the call-tip window would be out of the client
// space
const PRectangle rcClient = GetClientRectangle();