summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/null.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-07 00:28:08 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-07 00:28:08 +0100
commitb329003c8fdcdc3378c8fda93af54be5686fc9ae (patch)
treefdf007b67f5cdfb5331ea0bd3a492067c83dd2e4 /native/src/renderer/null.rs
parentd0dc7cebf9c352f4d14827fe47489788f59e61a1 (diff)
downloadiced-b329003c8fdcdc3378c8fda93af54be5686fc9ae.tar.gz
iced-b329003c8fdcdc3378c8fda93af54be5686fc9ae.tar.bz2
iced-b329003c8fdcdc3378c8fda93af54be5686fc9ae.zip
Implement styling for `Slider`
Diffstat (limited to 'native/src/renderer/null.rs')
-rw-r--r--native/src/renderer/null.rs25
1 files changed, 22 insertions, 3 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index 0184ac00..72f06a87 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -1,7 +1,7 @@
use crate::{
- button, checkbox, column, radio, row, scrollable, text, text_input, Color,
- Element, Font, HorizontalAlignment, Layout, Point, Rectangle, Renderer,
- Size, VerticalAlignment,
+ button, checkbox, column, radio, row, scrollable, slider, text, text_input,
+ Color, Element, Font, HorizontalAlignment, Layout, Point, Rectangle,
+ Renderer, Size, VerticalAlignment,
};
/// A renderer that does nothing.
@@ -180,3 +180,22 @@ impl checkbox::Renderer for Null {
) {
}
}
+
+impl slider::Renderer for Null {
+ type Style = ();
+
+ fn height(&self) -> u32 {
+ 30
+ }
+
+ fn draw(
+ &mut self,
+ _bounds: Rectangle,
+ _cursor_position: Point,
+ _range: std::ops::RangeInclusive<f32>,
+ _value: f32,
+ _is_dragging: bool,
+ _style_sheet: &Self::Style,
+ ) -> Self::Output {
+ }
+}