mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
Fix icons font not being loaded in main window
This commit is contained in:
parent
2afecf3b80
commit
0d7a9db4d9
2 changed files with 2 additions and 8 deletions
|
|
@ -218,7 +218,6 @@ pub enum AppMsg {
|
|||
widget_event: ComponentWidgetEvent,
|
||||
},
|
||||
Noop,
|
||||
FontLoaded(Result<(), font::Error>),
|
||||
ShowWindow,
|
||||
HideWindow,
|
||||
ToggleWindow,
|
||||
|
|
@ -482,6 +481,7 @@ fn run_non_wayland(minimized: bool) -> anyhow::Result<()> {
|
|||
},
|
||||
..Default::default()
|
||||
})
|
||||
.font(BOOTSTRAP_FONT_BYTES)
|
||||
.subscription(subscription)
|
||||
.theme(|state, _| state.theme.clone())
|
||||
.run()?;
|
||||
|
|
@ -529,7 +529,7 @@ fn new(#[cfg(target_os = "linux")] wayland: bool, minimized: bool) -> (AppModel,
|
|||
let theme = GauntletComplexTheme::new(setup_data.theme);
|
||||
GauntletComplexTheme::set_global(theme.clone());
|
||||
|
||||
let mut tasks = vec![font::load(BOOTSTRAP_FONT_BYTES).map(AppMsg::FontLoaded)];
|
||||
let mut tasks = vec![];
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let (main_window_id, open_task) = if wayland {
|
||||
|
|
@ -1145,10 +1145,6 @@ fn update(state: &mut AppModel, message: AppMsg) -> Task<AppMsg> {
|
|||
render_location,
|
||||
} => state.handle_plugin_event(widget_event, plugin_id, render_location),
|
||||
AppMsg::Noop => Task::none(),
|
||||
AppMsg::FontLoaded(result) => {
|
||||
result.expect("unable to load font");
|
||||
Task::none()
|
||||
}
|
||||
AppMsg::ToggleWindow => state.toggle_window(),
|
||||
AppMsg::ShowWindow => state.show_window(),
|
||||
AppMsg::HideWindow => state.hide_window(true),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ use iced::Pixels;
|
|||
use iced::border::Radius;
|
||||
use iced::keyboard::Modifiers;
|
||||
use iced::widget::text;
|
||||
use iced_fonts::BOOTSTRAP_FONT;
|
||||
use iced_fonts::bootstrap::arrow_return_left;
|
||||
use iced_fonts::bootstrap::command;
|
||||
use iced_fonts::bootstrap::option;
|
||||
|
|
@ -96,7 +95,6 @@ pub fn shortcut_to_text<'a, Message, Theme: text::Catalog + 'a>(
|
|||
if cfg!(target_os = "macos") {
|
||||
Some(
|
||||
text("^") // TODO bootstrap doesn't have proper macos ctrl icon
|
||||
.font(BOOTSTRAP_FONT) // todo replace
|
||||
.into(),
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue