From b075b0108dc141239286eab9cb921604f0eac5f3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 21 May 2021 14:14:05 -0600 Subject: [PATCH] Clarify variable name --- gpui/src/text_layout.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gpui/src/text_layout.rs b/gpui/src/text_layout.rs index 3bb00cb41c8370208517370bf068753335d680f4..af30630fb24b8020bc313b2b3526205334ad2f0d 100644 --- a/gpui/src/text_layout.rs +++ b/gpui/src/text_layout.rs @@ -200,8 +200,8 @@ impl Line { } } - pub fn paint(&self, origin: Vector2F, bounds: RectF, ctx: &mut PaintContext) { - let padding_top = (bounds.height() - self.layout.ascent - self.layout.descent) / 2.; + pub fn paint(&self, origin: Vector2F, visible_bounds: RectF, ctx: &mut PaintContext) { + let padding_top = (visible_bounds.height() - self.layout.ascent - self.layout.descent) / 2.; let baseline_origin = vec2f(0., padding_top + self.layout.ascent); let mut color_runs = self.color_runs.iter(); @@ -217,10 +217,10 @@ impl Line { for glyph in &run.glyphs { let glyph_origin = baseline_origin + glyph.position; - if glyph_origin.x() + max_glyph_width < bounds.origin().x() { + if glyph_origin.x() + max_glyph_width < visible_bounds.origin().x() { continue; } - if glyph_origin.x() > bounds.upper_right().x() { + if glyph_origin.x() > visible_bounds.upper_right().x() { break; }