aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Indicator.cxx3
-rw-r--r--src/ViewStyle.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index f9d0ca04a..35b2c3e5b 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -16,6 +16,7 @@
#include "Platform.h"
#include "Scintilla.h"
+#include "StringCopy.h"
#include "IntegerRectangle.h"
#include "Indicator.h"
#include "XPM.h"
@@ -189,7 +190,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
Point(ix + pixelHeight, iy + pixelHeight), // Right
Point(ix, iy) // Top
};
- surface->Polygon(pts, 3, sacDraw.fore, sacDraw.fore);
+ surface->Polygon(pts, ELEMENTS(pts), sacDraw.fore, sacDraw.fore);
}
} else { // Either INDIC_PLAIN or unknown
surface->MoveTo(irc.left, ymid);
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index d57ad48bd..2b87c8a51 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -79,7 +79,7 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, cons
descent = static_cast<unsigned int>(surface.Descent(font));
capitalHeight = surface.Ascent(font) - surface.InternalLeading(font);
aveCharWidth = surface.AverageCharWidth(font);
- spaceWidth = surface.WidthChar(font, ' ');
+ spaceWidth = surface.WidthText(font, " ", 1);
}
ViewStyle::ViewStyle() : markers(MARKER_MAX + 1), indicators(INDIC_MAX + 1) {
@@ -365,7 +365,8 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
controlCharWidth = 0.0;
if (controlCharSymbol >= 32) {
- controlCharWidth = surface.WidthChar(styles[STYLE_CONTROLCHAR].font, static_cast<char>(controlCharSymbol));
+ const char cc[2] = { static_cast<char>(controlCharSymbol), '\0' };
+ controlCharWidth = surface.WidthText(styles[STYLE_CONTROLCHAR].font, cc, 1);
}
CalculateMarginWidthAndMask();