Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 1.54 KB

README.md

File metadata and controls

46 lines (39 loc) · 1.54 KB

Iced library to create custom browsers

Build

Browser Widgets

Currently only supports Ultralight which has its own licence you should review

  • Navigation Bar
  • Tab Bar
  • Bookmark Bar

Examples

basic_browser.rs

cargo run --example basic_browser --features ultralight-resources

use iced::{Settings, Task, Theme};
use icy_browser::{get_fonts, Bookmark, IcyBrowser, Message, Ultralight};

fn run() -> (IcyBrowser<Ultralight>, Task<Message>) {
    (
        IcyBrowser::new()
            .with_tab_bar()
            .with_nav_bar()
            .bookmarks(&[Bookmark::new("https://www.rust-lang.org", "rust-lang.org")])
            .with_bookmark_bar()
            .build(),
        Task::none(),
    )
}

fn main() -> iced::Result {
    let settings = Settings {
        fonts: get_fonts(),
        ..Default::default()
    };

    iced::application("Basic Browser", IcyBrowser::update, IcyBrowser::view)
        .subscription(IcyBrowser::subscription)
        .settings(settings)
        .theme(|_| Theme::Dark)
        .run_with(run)
}