diff options
author | 2021-05-19 07:14:26 -0700 | |
---|---|---|
committer | 2021-05-19 07:14:26 -0700 | |
commit | ae484429d30a3360893d030a17e52caa4164a052 (patch) | |
tree | 4bfe30d3b46c7e30170e0b495d9a4dd1a2a1825f /graphics/src | |
parent | cf6af4c2560f5996bc533402ac3e4289c0c94702 (diff) | |
parent | 3918257883dba3cf260bd9764cb7b34101c435e6 (diff) | |
download | iced-ae484429d30a3360893d030a17e52caa4164a052.tar.gz iced-ae484429d30a3360893d030a17e52caa4164a052.tar.bz2 iced-ae484429d30a3360893d030a17e52caa4164a052.zip |
Merge branch 'hecrj:master' into upgrade-wgpu
Diffstat (limited to 'graphics/src')
-rw-r--r-- | graphics/src/widget/scrollable.rs | 10 | ||||
-rw-r--r-- | graphics/src/window/compositor.rs | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/graphics/src/widget/scrollable.rs b/graphics/src/widget/scrollable.rs index 57065ba2..2220e4b8 100644 --- a/graphics/src/widget/scrollable.rs +++ b/graphics/src/widget/scrollable.rs @@ -134,8 +134,16 @@ where Primitive::None }; + let scroll = Primitive::Clip { + bounds, + offset: Vector::new(0, 0), + content: Box::new(Primitive::Group { + primitives: vec![scrollbar, scroller], + }), + }; + Primitive::Group { - primitives: vec![clip, scrollbar, scroller], + primitives: vec![clip, scroll], } } else { content diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index 0bc8cbc8..7d5d789b 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -17,7 +17,10 @@ pub trait Compositor: Sized { type SwapChain; /// Creates a new [`Compositor`]. - fn new(settings: Self::Settings) -> Result<(Self, Self::Renderer), Error>; + fn new<W: HasRawWindowHandle>( + settings: Self::Settings, + compatible_window: Option<&W>, + ) -> Result<(Self, Self::Renderer), Error>; /// Crates a new [`Surface`] for the given window. /// |