diff options
author | nyamatongwe <devnull@localhost> | 2001-04-10 07:28:46 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-04-10 07:28:46 +0000 |
commit | 7d93f9820fdf159cd28b9dd988793e0097649d83 (patch) | |
tree | 156fbb94aaef3e5ed022f9c311e4599e34d9112f /src/CallTip.cxx | |
parent | c7f09e03f1d8598a6b039c9b86439872f105c1a2 (diff) | |
download | scintilla-mirror-7d93f9820fdf159cd28b9dd988793e0097649d83.tar.gz |
Calltip size fixing and listbox border tweaking.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx index b4e6b2da7..daa038798 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -5,8 +5,8 @@ // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org> // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h> -#include <string.h> +#include <stdlib.h> +#include <string.h> #include "Platform.h" @@ -29,7 +29,7 @@ CallTip::CallTip() { } CallTip::~CallTip() { - font.Release(); + font.Release(); wCallTip.Destroy(); delete []val; val = 0; @@ -45,7 +45,7 @@ void CallTip::RefreshColourPalette(Palette &pal, bool want) { void CallTip::PaintCT(Surface *surfaceWindow) { if (!val) - return; + return ; PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); @@ -120,7 +120,8 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, const char *faceName, int size) { Surface surfaceMeasure; surfaceMeasure.Init(); - int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72; + int deviceHeight = surfaceMeasure.DeviceHeightFont(size); + //int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72; font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false); if (val) delete []val; @@ -149,10 +150,9 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, int lineHeight = surfaceMeasure.Height(font); // Extra line for border and an empty line at top and bottom int height = lineHeight * numLines - surfaceMeasure.InternalLeading(font) + 2 + 2; - return PRectangle(pt.x -5, pt.y + lineHeight + 1, pt.x + width - 5, pt.y + lineHeight + 1 + height); + return PRectangle(pt.x -5, pt.y + 1, pt.x + width - 5, pt.y + 1 + height); } - void CallTip::CallTipCancel() { inCallTipMode = false; if (wCallTip.Created()) { |