Skip to content

Commit

Permalink
feat: support mac too
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenLoc committed May 11, 2023
1 parent 14b8bb5 commit 7f0301f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,48 @@ fn main() {
}

#[cfg(not(target_arch = "wasm32"))]
fn main() -> eframe::Result<()> {
tracing_subscriber::fmt::init();
let native_options = eframe::NativeOptions {
always_on_top: false,
maximized: false,
decorated: true,
drag_and_drop_support: true,
icon_data: None,
initial_window_pos: Option::from(egui::Pos2::new(300_f32, 100_f32)),
initial_window_size: Option::from(egui::Vec2::new(1000_f32, 1000_f32)),
min_window_size: None,
max_window_size: None,
resizable: true,
transparent: true,
vsync: true,
multisampling: 0,
depth_buffer: 0,
stencil_buffer: 0,
fullscreen: false,
mouse_passthrough: Default::default(),
hardware_acceleration: eframe::HardwareAcceleration::Preferred,
renderer: eframe::Renderer::Glow,
follow_system_theme: Default::default(),
default_theme: eframe::Theme::Dark,
run_and_return: Default::default(),
event_loop_builder: Default::default(),
shader_version: Default::default(),
centered: true,
};
eframe::run_native(
"TypeFast",
native_options,
Box::new(|cc| Box::new(TypeFastApp::new(cc))),
)
}

#[cfg(target_os = "macos")]
fn main() -> eframe::Result<()> {
tracing_subscriber::fmt::init();

let native_options = eframe::NativeOptions {
fullsize_content:false,
always_on_top: false,
maximized: false,
decorated: true,
Expand Down

0 comments on commit 7f0301f

Please sign in to comment.