From 31e3b6fbcb06bd5e1e5773a7c2febd0cb0092819 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 3 Dec 2019 06:48:29 +0100 Subject: Unify logic by introducing `scrollable::Scrollbar` --- native/src/renderer/null.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'native/src/renderer/null.rs') diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index 2ce150c0..da0e5159 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -61,17 +61,13 @@ impl text::Renderer for Null { } impl scrollable::Renderer for Null { - fn scrollbar_bounds(_bounds: Rectangle) -> Rectangle { - Default::default() - } - - fn scroller_bounds( + fn scrollbar( + &self, _bounds: Rectangle, _content_bounds: Rectangle, - _scrollbar_bounds: Rectangle, _offset: u32, - ) -> Rectangle { - Default::default() + ) -> Option { + None } fn draw( @@ -81,8 +77,7 @@ impl scrollable::Renderer for Null { _content_bounds: Rectangle, _is_mouse_over: bool, _is_mouse_over_scrollbar: bool, - _scrollbar_bounds: Rectangle, - _scroller_bounds: Rectangle, + _scrollbar: Option, _offset: u32, _content: Self::Output, ) { -- cgit