diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:13:13 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:13:13 +1000 |
commit | c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7 (patch) | |
tree | e5f93f314c700da99e6c54f590d034645c73a111 /src/ViewStyle.cxx | |
parent | 3fc8c97d80a6797e60e6b203c9b4aa9d553df8a7 (diff) | |
download | scintilla-mirror-c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7.tar.gz |
Modernize Platform.h (3) - update Surface to delete WidthChar, use size_t for
Polygon and delete the standard copy and assignment methods.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 8a27f8bf2..1a95450ce 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -80,7 +80,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) { @@ -366,7 +366,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(); |