summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar Aaron Housh <Dispersia@users.noreply.github.com>2021-05-19 07:14:26 -0700
committerLibravatar Aaron Housh <Dispersia@users.noreply.github.com>2021-05-19 07:14:26 -0700
commitae484429d30a3360893d030a17e52caa4164a052 (patch)
tree4bfe30d3b46c7e30170e0b495d9a4dd1a2a1825f /graphics/src
parentcf6af4c2560f5996bc533402ac3e4289c0c94702 (diff)
parent3918257883dba3cf260bd9764cb7b34101c435e6 (diff)
downloadiced-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.rs10
-rw-r--r--graphics/src/window/compositor.rs5
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.
///