summaryrefslogtreecommitdiffstats
path: root/native/src/renderer
diff options
context:
space:
mode:
authorLibravatar Kaiden42 <gitlab@tinysn.com>2020-09-19 18:44:27 +0200
committerLibravatar Héctor Ramón <hector@lich.io>2021-06-03 20:21:02 +0700
commit52a185fbab728b85cf414d4997567f52ebc66205 (patch)
tree7592348bfd383d2de0c6af6fd7db4d76e9ffac5d /native/src/renderer
parent1dce929dfcfd3f9acc06e3b55157d40eb06b1324 (diff)
downloadiced-52a185fbab728b85cf414d4997567f52ebc66205.tar.gz
iced-52a185fbab728b85cf414d4997567f52ebc66205.tar.bz2
iced-52a185fbab728b85cf414d4997567f52ebc66205.zip
Implement `Toggler` widget for iced_native
Diffstat (limited to 'native/src/renderer')
-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..89bb9433 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: Self::Output,
+ _style: &Self::Style,
+ ) {
+ }
+}