Implement Toggler widget for iced_native

This commit is contained in:
Kaiden42 2020-09-19 18:44:27 +02:00 committed by Héctor Ramón
parent 1dce929dfc
commit 52a185fbab
10 changed files with 452 additions and 4 deletions

View file

@ -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,
) {
}
}