Support null renderer

This commit is contained in:
Friz64 2019-11-30 18:16:01 +01:00
parent c12ba14dda
commit 9a733bb3c8

View file

@ -61,11 +61,21 @@ impl text::Renderer for Null {
} }
impl scrollable::Renderer for Null { impl scrollable::Renderer for Null {
fn scrollbar_grab( fn scrollbar_bounds(
&self, &self,
_bounds: Rectangle, _bounds: Rectangle,
_content_bounds: Rectangle, _content_bounds: Rectangle,
_offset: u32, _offset: u32,
) -> (Rectangle, Rectangle) {
Default::default()
}
fn scrollbar_grab(
&self,
_bounds: Rectangle,
_content_bounds: Rectangle,
_background_bounds: Rectangle,
_scroller_bounds: Rectangle,
_cursor_position: Point, _cursor_position: Point,
) -> Option<ScrollbarGrab> { ) -> Option<ScrollbarGrab> {
None None