summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@lich.io>2021-05-03 15:42:02 +0700
committerLibravatar Héctor Ramón <hector@lich.io>2021-05-03 15:42:02 +0700
commit59c2500c55430ac715b846017f79ad93a58fc3a5 (patch)
tree9e3512c9b8890dfe364817b78366af571482318a /graphics
parent4b8ba8309f6645cdcb5bd605f8dd88097f8ee5a7 (diff)
downloadiced-59c2500c55430ac715b846017f79ad93a58fc3a5.tar.gz
iced-59c2500c55430ac715b846017f79ad93a58fc3a5.tar.bz2
iced-59c2500c55430ac715b846017f79ad93a58fc3a5.zip
Fix `Scrollable` scrollbar being rendered behind contents
... by issuing a new clip layer just for the scrollbar itself.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/widget/scrollable.rs10
1 files changed, 9 insertions, 1 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