summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer/scrollable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu/src/renderer/scrollable.rs')
-rw-r--r--wgpu/src/renderer/scrollable.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/wgpu/src/renderer/scrollable.rs b/wgpu/src/renderer/scrollable.rs
index 7bce3a68..e9dfc760 100644
--- a/wgpu/src/renderer/scrollable.rs
+++ b/wgpu/src/renderer/scrollable.rs
@@ -56,7 +56,7 @@ impl scrollable::Renderer for Renderer {
let (content, mouse_cursor) =
scrollable.content.draw(self, content, cursor_position);
- let primitive = Primitive::Clip {
+ let clip = Primitive::Clip {
bounds,
offset,
content: Box::new(content),
@@ -107,19 +107,15 @@ impl scrollable::Renderer for Renderer {
};
Primitive::Group {
- primitives: vec![
- primitive,
- scrollbar_background,
- scrollbar,
- ],
+ primitives: vec![clip, scrollbar_background, scrollbar],
}
} else {
Primitive::Group {
- primitives: vec![primitive, scrollbar],
+ primitives: vec![clip, scrollbar],
}
}
} else {
- primitive
+ clip
},
if is_mouse_over_scrollbar
|| scrollable.state.is_scrollbar_grabbed()