Remove Renderer trait for Checkbox
This commit is contained in:
parent
b6ae87ae55
commit
7c08c6bd13
8 changed files with 40 additions and 82 deletions
|
|
@ -1,23 +1,10 @@
|
|||
//! Show toggle controls using checkboxes.
|
||||
use crate::backend::{self, Backend};
|
||||
use crate::Renderer;
|
||||
|
||||
use iced_native::checkbox;
|
||||
|
||||
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>>;
|
||||
|
||||
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;
|
||||
}
|
||||
pub type Checkbox<'a, Message, Backend> =
|
||||
iced_native::Checkbox<'a, Message, Renderer<Backend>>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue