diff --git a/examples/WidgetIDReturn/src/main.rs b/examples/WidgetIDReturn/src/main.rs index c87577ec..0f825769 100644 --- a/examples/WidgetIDReturn/src/main.rs +++ b/examples/WidgetIDReturn/src/main.rs @@ -52,7 +52,7 @@ impl Application for NumberInputDemo { ( NumberInputDemo::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/card/src/main.rs b/examples/card/src/main.rs index 0b535f04..59a4a3f8 100644 --- a/examples/card/src/main.rs +++ b/examples/card/src/main.rs @@ -43,7 +43,7 @@ impl Application for CardExample { ( CardExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/color_picker/src/main.rs b/examples/color_picker/src/main.rs index 513bb5ad..ace3f582 100644 --- a/examples/color_picker/src/main.rs +++ b/examples/color_picker/src/main.rs @@ -46,7 +46,7 @@ impl Application for ColorPickerExample { ( ColorPickerExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/date_picker/src/main.rs b/examples/date_picker/src/main.rs index e32a76ac..8e49a420 100644 --- a/examples/date_picker/src/main.rs +++ b/examples/date_picker/src/main.rs @@ -43,7 +43,7 @@ impl Application for DatePickerExample { ( DatePickerExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/floating_element/src/main.rs b/examples/floating_element/src/main.rs index 63e3857b..9842babf 100644 --- a/examples/floating_element/src/main.rs +++ b/examples/floating_element/src/main.rs @@ -6,8 +6,10 @@ use iced::{ Application, Command, Element, Length, Settings, Theme, }; +use iced_aw::BootstrapIcon; use iced_aw::floating_element::Anchor; -use iced_aw::{helpers::floating_element, Icon, BOOTSTRAP_FONT}; +use iced_aw::graphics::icons::bootstrap::icon_to_string; +use iced_aw::{helpers::floating_element, BOOTSTRAP_FONT}; fn main() -> iced::Result { FloatingElementExample::run(Settings::default()) @@ -45,7 +47,7 @@ impl Application for FloatingElementExample { ( FloatingElementExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) @@ -106,7 +108,7 @@ impl Application for FloatingElementExample { .max_height(600) .style(theme::Container::Box), Button::new( - Text::new(Icon::Plus.to_string()) + Text::new(icon_to_string(BootstrapIcon::Plus)) .font(BOOTSTRAP_FONT) .size(35) .line_height(1.0) diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index eac430ed..025fca0c 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -47,7 +47,7 @@ impl Application for ModalExample { ( ModalExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/modal_component/src/main.rs b/examples/modal_component/src/main.rs index 91997aa2..0bd03e98 100644 --- a/examples/modal_component/src/main.rs +++ b/examples/modal_component/src/main.rs @@ -44,7 +44,7 @@ impl Application for ModalExample { ( ModalExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/multiple_modals/src/main.rs b/examples/multiple_modals/src/main.rs index ffbacb3c..faedecc7 100644 --- a/examples/multiple_modals/src/main.rs +++ b/examples/multiple_modals/src/main.rs @@ -56,7 +56,7 @@ impl Application for MultipleModalsExample { state: State::Start, button_pressed: None, }, - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), ) } diff --git a/examples/number_input/src/main.rs b/examples/number_input/src/main.rs index 23473e9b..c94ef7a4 100644 --- a/examples/number_input/src/main.rs +++ b/examples/number_input/src/main.rs @@ -49,7 +49,7 @@ impl Application for NumberInputDemo { ( NumberInputDemo::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/tab_bar/src/main.rs b/examples/tab_bar/src/main.rs index 47b3bd5c..97b50f3f 100644 --- a/examples/tab_bar/src/main.rs +++ b/examples/tab_bar/src/main.rs @@ -48,7 +48,7 @@ impl Application for TabBarExample { ( TabBarExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) diff --git a/examples/tabs/src/main.rs b/examples/tabs/src/main.rs index 394d22a4..ec0213f2 100644 --- a/examples/tabs/src/main.rs +++ b/examples/tabs/src/main.rs @@ -19,8 +19,8 @@ use settings::{SettingsMessage, SettingsTab, TabBarPosition}; const HEADER_SIZE: u16 = 32; const TAB_PADDING: u16 = 16; -const BOOTSTRAP_FONT: &[u8] = include_bytes!("../fonts/icons.ttf"); -const BOOTSTRAP_FONT: Font = Font::with_name("icons"); +const ICON_BYTES: &[u8] = include_bytes!("../fonts/icons.ttf"); +const ICON: Font = Font::with_name("icons"); enum Icon { User, @@ -89,7 +89,7 @@ impl Application for TabBarExample { ( TabBarExample::Loading, Command::batch(vec![ - font::load(BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(ICON_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), ) @@ -173,7 +173,7 @@ impl Application for TabBarExample { ) .set_active_tab(&state.active_tab) .tab_bar_style(theme.clone()) - .BOOTSTRAP_FONT(BOOTSTRAP_FONT) + .icon_font(ICON) .tab_bar_position(match position { TabBarPosition::Top => iced_aw::TabBarPosition::Top, TabBarPosition::Bottom => iced_aw::TabBarPosition::Bottom, diff --git a/examples/time_picker/src/main.rs b/examples/time_picker/src/main.rs index 7f6e3ff0..9ba56f48 100644 --- a/examples/time_picker/src/main.rs +++ b/examples/time_picker/src/main.rs @@ -45,7 +45,7 @@ impl Application for TimePickerExample { ( TimePickerExample::Loading, Command::batch(vec![ - font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT).map(Message::FontLoaded), + font::load(iced_aw::graphics::icons::BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded), Command::perform(load(), Message::Loaded), ]), )