2020-05-19 17:15:44 +02:00
|
|
|
//! Create choices using radio buttons.
|
2021-10-14 16:07:22 +07:00
|
|
|
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>;
|
|
|
|
|
|
2020-09-06 15:02:55 +02:00
|
|
|
const DEFAULT_SIZE: u16 = 28;
|
2020-05-19 21:00:40 +02:00
|
|
|
const DEFAULT_SPACING: u16 = 15;
|
|
|
|
|
}
|