Skip to content

Commit

Permalink
Merge pull request #219 from Redhawk18/main
Browse files Browse the repository at this point in the history
reran icon script and removed all garbage unicode values
  • Loading branch information
genusistimelord authored Mar 5, 2024
2 parents e745f75 + fd78299 commit 740c683
Show file tree
Hide file tree
Showing 16 changed files with 10,962 additions and 12,361 deletions.
6 changes: 3 additions & 3 deletions examples/floating_element multioverlay/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use iced::{
};

use iced_aw::floating_element::Anchor;
use iced_aw::graphics::icons::icon_to_string;
use iced_aw::BootstrapIcon;
use iced_aw::graphics::icons::bootstrap::icon_to_string;
use iced_aw::Bootstrap;
use iced_aw::{helpers::floating_element, BOOTSTRAP_FONT};

fn main() -> iced::Result {
Expand Down Expand Up @@ -103,7 +103,7 @@ impl Application for FloatingElementExample {
.max_height(600)
.style(theme::Container::Box),
Button::new(
Text::new(icon_to_string(BootstrapIcon::Plus))
Text::new(icon_to_string(Bootstrap::Plus))
.font(BOOTSTRAP_FONT)
.size(35)
.line_height(1.0)
Expand Down
6 changes: 3 additions & 3 deletions examples/floating_element/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use iced::{
};

use iced_aw::floating_element::Anchor;
use iced_aw::graphics::icons::icon_to_string;
use iced_aw::BootstrapIcon;
use iced_aw::graphics::icons::bootstrap::icon_to_string;
use iced_aw::Bootstrap;
use iced_aw::{helpers::floating_element, BOOTSTRAP_FONT};

fn main() -> iced::Result {
Expand Down Expand Up @@ -109,7 +109,7 @@ impl Application for FloatingElementExample {
.max_height(600)
.style(theme::Container::Box),
Button::new(
Text::new(icon_to_string(BootstrapIcon::Plus))
Text::new(icon_to_string(Bootstrap::Plus))
.font(BOOTSTRAP_FONT)
.size(35)
.line_height(1.0)
Expand Down
4 changes: 2 additions & 2 deletions examples/menu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use iced::widget::{
use iced::widget::{column as col, vertical_space};
use iced::{alignment, theme, Application, Border, Color, Element, Length, Pixels, Size};

use iced_aw::graphics::icons::{BootstrapIcon, BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES};
use iced_aw::graphics::icons::{Bootstrap, BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES};
use iced_aw::menu::{self, Item, Menu, StyleSheet};
use iced_aw::style::MenuBarStyle;
use iced_aw::{menu_bar, menu_items};
Expand Down Expand Up @@ -534,7 +534,7 @@ fn submenu_button<'a>(label: &str) -> button::Button<'a, Message, iced::Theme, i
text(label)
.width(Length::Fill)
.vertical_alignment(alignment::Vertical::Center),
text(BootstrapIcon::CaretRightFill)
text(Bootstrap::CaretRightFill)
.font(BOOTSTRAP_FONT)
.width(Length::Shrink)
.vertical_alignment(alignment::Vertical::Center),
Expand Down
Binary file modified src/graphics/fonts/bootstrap-icons.ttf
Binary file not shown.
Binary file modified src/graphics/fonts/nerd-icons.ttf
Binary file not shown.
5 changes: 3 additions & 2 deletions src/graphics/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ cfg_if! {
pub mod bootstrap;
pub mod nerd;

pub use bootstrap::{BootstrapIcon, icon_to_char, icon_to_string};
pub use bootstrap::Bootstrap;
pub use nerd::Nerd;
/// The default icon font bytes for loading the font into iced.
pub const BOOTSTRAP_FONT_BYTES: &[u8] = include_bytes!("./fonts/bootstrap-icons.ttf");
/// the icon font that has all nerd fonts.
Expand All @@ -21,7 +22,7 @@ cfg_if! {

} else {
pub mod required;
pub use required::{BootstrapIcon, icon_to_char, icon_to_string};
// pub use required::{Bootstrap, icon_to_char, icon_to_string};
/// The default icon font bytes for loading the font into iced.
pub const BOOTSTRAP_FONT_BYTES: &[u8] = include_bytes!("./fonts/required-icons.ttf");
/// The default icon font.
Expand Down
4,141 changes: 2,078 additions & 2,063 deletions src/graphics/icons/bootstrap.rs

Large diffs are not rendered by default.

Loading

0 comments on commit 740c683

Please sign in to comment.