From 0030bcbd33f5c4db60aac826552042e46b51c691 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 5 Feb 2020 00:23:22 +0100 Subject: Rename module `style` to `css` in `iced_web` --- web/src/widget/radio.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/src/widget/radio.rs') diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs index 6dd0ad45..4570639c 100644 --- a/web/src/widget/radio.rs +++ b/web/src/widget/radio.rs @@ -1,4 +1,4 @@ -use crate::{style, Bus, Color, Element, Widget}; +use crate::{Bus, Color, Css, Element, Widget}; use dodrio::bumpalo; @@ -76,7 +76,7 @@ where &self, bump: &'b bumpalo::Bump, bus: &Bus, - _style_sheet: &mut style::Sheet<'b>, + _style_sheet: &mut Css<'b>, ) -> dodrio::Node<'b> { use dodrio::builder::*; -- cgit From ce45ecc23546efd85f04a76fcb1a3a691d259129 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 6 Feb 2020 00:28:25 +0100 Subject: Expose missing widget modules in `iced_web` --- web/src/widget/radio.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'web/src/widget/radio.rs') diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs index 4570639c..e8721cee 100644 --- a/web/src/widget/radio.rs +++ b/web/src/widget/radio.rs @@ -1,3 +1,4 @@ +//! Create choices using radio buttons. use crate::{Bus, Color, Css, Element, Widget}; use dodrio::bumpalo; -- cgit From b4a8471aa187de511301605a56cf531923dfb6bd Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 6 Feb 2020 00:33:26 +0100 Subject: Expose styling types for `radio` in `iced_web` --- web/src/widget/radio.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'web/src/widget/radio.rs') diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs index e8721cee..e00e26db 100644 --- a/web/src/widget/radio.rs +++ b/web/src/widget/radio.rs @@ -1,5 +1,7 @@ //! Create choices using radio buttons. -use crate::{Bus, Color, Css, Element, Widget}; +use crate::{Bus, Css, Element, Widget}; + +pub use iced_style::radio::{Style, StyleSheet}; use dodrio::bumpalo; @@ -33,7 +35,7 @@ pub struct Radio { is_selected: bool, on_click: Message, label: String, - label_color: Option, + style: Box, } impl Radio { @@ -56,15 +58,15 @@ impl Radio { is_selected: Some(value) == selected, on_click: f(value), label: String::from(label), - label_color: None, + style: Default::default(), } } - /// Sets the `Color` of the label of the [`Radio`]. + /// Sets the style of the [`Radio`] button. /// /// [`Radio`]: struct.Radio.html - pub fn label_color>(mut self, color: C) -> Self { - self.label_color = Some(color.into()); + pub fn style(mut self, style: impl Into>) -> Self { + self.style = style.into(); self } } -- cgit