diff --git a/src/client/spark/view/Controls/Badge.cs b/src/client/spark/view/Controls/Badge.cs index 1fb7e9f0c..92329e24f 100644 --- a/src/client/spark/view/Controls/Badge.cs +++ b/src/client/spark/view/Controls/Badge.cs @@ -334,7 +334,7 @@ namespace mbts.ui.controls { } } - var qty_g = _gcr.create_glyph_run(); + var qty_g = _gcr.glyph_run; if (qty_g != null) { var qty_geom = qty_g.BuildGeometry(); diff --git a/src/client/spark/view/Utility/IVisualContentRect.cs b/src/client/spark/view/Utility/IVisualContentRect.cs index 81ab7bc85..1e92d14a6 100644 --- a/src/client/spark/view/Utility/IVisualContentRect.cs +++ b/src/client/spark/view/Utility/IVisualContentRect.cs @@ -135,18 +135,16 @@ namespace mbts.ui { public Size available_size { get => _vcr.available_size; set => _vcr.available_size = value; } public Size layout_size { get { _ensure_current(); return _vcr.layout_size; } } public Rect content_area { get { _ensure_current(); return _vcr.content_area; } } - public GlyphRun create_glyph_run() { - if (_text_lines.is_null_or_empty()) - return null; - _ensure_current(); - Point pt = _vcr.content_area.BottomLeft; - //if (_glyph_run == null) { - // _glyph_run = _glyph_context.from_arranged(_font_size, pt, _glyph_indices, _advance_widths, _glyph_offsets); - //} else if (_glyph_run.BaselineOrigin != pt) { - // _glyph_run.BaselineOrigin = pt; - //} - _glyph_run = _glyph_context.from_arranged(_font_size, pt, _glyph_indices, _advance_widths, _glyph_offsets); - return _glyph_run; + public GlyphRun glyph_run { + get { + if (_text_lines.is_null_or_empty()) + return null; + _ensure_current(); + Point pt = _vcr.content_area.BottomLeft; + if (_glyph_run == null || _glyph_run.BaselineOrigin != pt) + _glyph_run = _glyph_context.from_arranged(_font_size, pt, _glyph_indices, _advance_widths, _glyph_offsets); + return _glyph_run; + } } void _ensure_current() {