精简Windows平台的代码
This commit is contained in:
@@ -104,15 +104,15 @@ fn main() -> wry::Result<()> {
|
|||||||
})
|
})
|
||||||
.with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
|
.with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let icon_path = format!("png/{}_32.ico", package_name);
|
let window = {
|
||||||
#[cfg(target_os = "windows")]
|
let icon_path = format!("png/{}_32.ico", package_name);
|
||||||
let icon = load_icon(std::path::Path::new(&icon_path));
|
let icon = load_icon(std::path::Path::new(&icon_path));
|
||||||
#[cfg(target_os = "windows")]
|
common_window
|
||||||
let window = common_window
|
.with_decorations(true)
|
||||||
.with_decorations(true)
|
.with_window_icon(Some(icon))
|
||||||
.with_window_icon(Some(icon))
|
.build(&event_loop)
|
||||||
.build(&event_loop)
|
.unwrap()
|
||||||
.unwrap();
|
};
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
let window = common_window.build(&event_loop).unwrap();
|
let window = common_window.build(&event_loop).unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user