From 470266f54069a1c9b6147026d018b437b6457f7b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 5 Nov 2019 03:16:46 +0100 Subject: Add horizontal offset to `Primitive::Clip` --- wgpu/src/renderer/text_input.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wgpu/src/renderer/text_input.rs') diff --git a/wgpu/src/renderer/text_input.rs b/wgpu/src/renderer/text_input.rs index deb8eae7..95ea964e 100644 --- a/wgpu/src/renderer/text_input.rs +++ b/wgpu/src/renderer/text_input.rs @@ -2,7 +2,7 @@ use crate::{Primitive, Renderer}; use iced_native::{ text::HorizontalAlignment, text::VerticalAlignment, text_input, Background, - Color, MouseCursor, Point, Rectangle, TextInput, + Color, MouseCursor, Point, Rectangle, TextInput, Vector, }; use std::f32; @@ -89,7 +89,7 @@ impl text_input::Renderer for Renderer { let content = Primitive::Clip { bounds: text_bounds, - offset: 0, + offset: Vector::new(0, 0), content: Box::new(if text_input.state.is_focused { use wgpu_glyph::{GlyphCruncher, Scale, Section}; -- cgit