Skip to content

Commit

Permalink
Changes from #1057
Browse files Browse the repository at this point in the history
  • Loading branch information
ForLoveOfCats committed Aug 27, 2020
1 parent c4f8a32 commit cca400c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions druid/src/scroll_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,18 @@ impl ScrollComponent {
if self.scrollbars.opacity > 0.0 {
ctx.request_anim_frame();
}

let viewport = ctx.size().to_rect();
if viewport.width() < self.content_size.width {
ctx.request_paint_rect(
self.calc_horizontal_bar_bounds(viewport, env) - self.scroll_offset,
);
}
if viewport.height() < self.content_size.height {
ctx.request_paint_rect(
self.calc_vertical_bar_bounds(viewport, env) - self.scroll_offset,
);
}
}
}

Expand Down

0 comments on commit cca400c

Please sign in to comment.