Skip to content

Commit

Permalink
fixed menu example!
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Jun 27, 2024
1 parent 3b4b301 commit 9ef6717
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/menu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use iced::widget::{
toggler, vertical_slider,
};
use iced::widget::{column as col, vertical_space};
use iced::{alignment, theme, Border, Color, Element, Length, Size};
use iced::{alignment, theme, Border, Color, Element, Length, Size, Theme};

use iced_aw::menu::{self, Item, Menu};
use iced_aw::style::{menu_bar::primary, Status};
Expand All @@ -13,6 +13,7 @@ use iced_aw::{Bootstrap, BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES};

pub fn main() -> iced::Result {
iced::application(App::title, App::update, App::view)
.theme(App::theme)
.font(BOOTSTRAP_FONT_BYTES)
.window_size(Size::new(1000.0, 600.0))
.run()
Expand Down Expand Up @@ -455,6 +456,10 @@ impl App {

back.into()
}

fn theme(&self) -> Theme {
self.theme.clone()
}
}

fn base_button<'a>(
Expand Down

0 comments on commit 9ef6717

Please sign in to comment.