Hide the scrollbar track, not just the thumb

Max Brunsfeld created

Change summary

crates/editor/src/element.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Detailed changes

crates/editor/src/element.rs 🔗

@@ -931,13 +931,13 @@ impl EditorElement {
         let track_bounds = RectF::from_points(vec2f(left, top), vec2f(right, bottom));
         let thumb_bounds = RectF::from_points(vec2f(left, thumb_top), vec2f(right, thumb_bottom));
 
-        cx.scene.push_quad(Quad {
-            bounds: track_bounds,
-            border: style.track.border,
-            background: style.track.background_color,
-            ..Default::default()
-        });
         if layout.show_scrollbars {
+            cx.scene.push_quad(Quad {
+                bounds: track_bounds,
+                border: style.track.border,
+                background: style.track.background_color,
+                ..Default::default()
+            });
             cx.scene.push_quad(Quad {
                 bounds: thumb_bounds,
                 border: style.thumb.border,