Wire up styling to Radio in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-20 19:06:53 +07:00
parent cc560aca18
commit d39ad717ed
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
11 changed files with 97 additions and 135 deletions

View file

@ -1,6 +1,5 @@
//! Create choices using radio buttons.
use crate::{Backend, Renderer};
use iced_native::radio;
use crate::Renderer;
pub use iced_style::radio::{Style, StyleSheet};
@ -8,15 +7,5 @@ pub use iced_style::radio::{Style, StyleSheet};
///
/// This is an alias of an `iced_native` radio button with an
/// `iced_wgpu::Renderer`.
pub type Radio<Message, Backend> =
iced_native::Radio<Message, Renderer<Backend>>;
impl<B> radio::Renderer for Renderer<B>
where
B: Backend,
{
type Style = Box<dyn StyleSheet>;
const DEFAULT_SIZE: u16 = 28;
const DEFAULT_SPACING: u16 = 15;
}
pub type Radio<'a, Message, Backend> =
iced_native::Radio<'a, Message, Renderer<Backend>>;