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

23 lines
548 B
Rust
Raw Normal View History

2020-05-19 17:15:44 +02:00
//! Create choices using radio buttons.
use crate::{Backend, Renderer};
2020-05-19 21:00:40 +02:00
use iced_native::radio;
2020-05-19 17:15:44 +02:00
pub use iced_style::radio::{Style, StyleSheet};
/// A circular button representing a choice.
///
/// 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>>;
2020-05-19 21:00:40 +02:00
impl<B> radio::Renderer for Renderer<B>
where
B: Backend,
{
type Style = Box<dyn StyleSheet>;
const DEFAULT_SIZE: u16 = 28;
2020-05-19 21:00:40 +02:00
const DEFAULT_SPACING: u16 = 15;
}