iced-yoda/graphics/src/widget/checkbox.rs

24 lines
587 B
Rust
Raw Normal View History

2020-05-19 17:15:44 +02:00
//! Show toggle controls using checkboxes.
2020-05-19 21:00:40 +02:00
use crate::backend::{self, Backend};
use crate::Renderer;
2020-05-19 21:00:40 +02:00
use iced_native::checkbox;
2020-05-19 17:15:44 +02:00
pub use iced_style::checkbox::{Style, StyleSheet};
/// A box that can be checked.
///
/// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`.
pub type Checkbox<Message, Backend> =
iced_native::Checkbox<Message, Renderer<Backend>>;
2020-05-19 21:00:40 +02:00
impl<B> checkbox::Renderer for Renderer<B>
where
B: Backend + backend::Text,
{
type Style = Box<dyn StyleSheet>;
const DEFAULT_SIZE: u16 = 20;
const DEFAULT_SPACING: u16 = 15;
}