summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/null.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-06-03 20:55:50 +0700
committerLibravatar GitHub <noreply@github.com>2021-06-03 20:55:50 +0700
commit397a5c06ec4911ffe397098be99480aaa1df66f7 (patch)
tree00182b32b48a2584aceafd3c9ad1947535ed1893 /native/src/renderer/null.rs
parent1dce929dfcfd3f9acc06e3b55157d40eb06b1324 (diff)
parentd3d6f3efb33f601ff3fca4a6496cfeef052501ee (diff)
downloadiced-397a5c06ec4911ffe397098be99480aaa1df66f7.tar.gz
iced-397a5c06ec4911ffe397098be99480aaa1df66f7.tar.bz2
iced-397a5c06ec4911ffe397098be99480aaa1df66f7.zip
Merge pull request #535 from Kaiden42/toggler
Implement `Toggler` widget for iced_native
Diffstat (limited to 'native/src/renderer/null.rs')
-rw-r--r--native/src/renderer/null.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index 28746585..bb57c163 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -1,6 +1,6 @@
use crate::{
button, checkbox, column, container, pane_grid, progress_bar, radio, row,
- scrollable, slider, text, text_input, Color, Element, Font,
+ scrollable, slider, text, text_input, toggler, Color, Element, Font,
HorizontalAlignment, Layout, Padding, Point, Rectangle, Renderer, Size,
VerticalAlignment,
};
@@ -288,3 +288,19 @@ impl pane_grid::Renderer for Null {
) {
}
}
+
+impl toggler::Renderer for Null {
+ type Style = ();
+
+ const DEFAULT_SIZE: u16 = 20;
+
+ fn draw(
+ &mut self,
+ _bounds: Rectangle,
+ _is_checked: bool,
+ _is_mouse_over: bool,
+ _label: Option<Self::Output>,
+ _style: &Self::Style,
+ ) {
+ }
+}