Add horizontal offset to Primitive::Clip

This commit is contained in:
Héctor Ramón Jiménez 2019-11-05 03:16:46 +01:00
parent ba470a2b2a
commit 470266f540
6 changed files with 40 additions and 25 deletions

View file

@ -1,7 +1,7 @@
use crate::{Primitive, Renderer};
use iced_native::{
scrollable, Background, Color, Layout, MouseCursor, Point, Rectangle,
Scrollable, Widget,
Scrollable, Vector, Widget,
};
const SCROLLBAR_WIDTH: u16 = 10;
@ -58,7 +58,7 @@ impl scrollable::Renderer for Renderer {
let clip = Primitive::Clip {
bounds,
offset,
offset: Vector::new(0, offset),
content: Box::new(content),
};