fixed text box rendering
@@ -520,14 +520,18 @@ impl Control for TextBox {
None,
);
- let screen_position = bounds.position;
- drawing_context.draw_text(bounds, screen_position, &self.formatted_text.borrow());
+ let local_position = bounds.position;
+ drawing_context.draw_text(
+ self.clip_bounds(),
+ local_position,
+ &self.formatted_text.borrow(),
+ );
if self.caret_visible {
let text = self.formatted_text.borrow();
let font = text.get_font();
- let mut caret_pos = screen_position;
+ let mut caret_pos = local_position;
let font = font.0.lock();
if let Some(line) = text.get_lines().get(self.caret_position.line) {
