aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authormitchell <unknown>2018-05-25 13:33:38 -0400
committermitchell <unknown>2018-05-25 13:33:38 -0400
commit43566e4211e18057662ff5d8c8d3996b73090d43 (patch)
tree0b501aa992e9ccdcc36b25d10d72a51785a9a515 /src/ViewStyle.cxx
parent7a4fd484cc8229d3518039c82d950b4fa7f673cb (diff)
downloadscintilla-mirror-43566e4211e18057662ff5d8c8d3996b73090d43.tar.gz
Backport: Modernize Platform.h (3) - update Surface to delete WidthChar, use size_t for Polygon and delete the standard copy and assignment methods.
Backport of changeset 6940:89fd29243232.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx5
1 files changed, 3 insertions, 2 deletions
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();