🐛 代码格式检查以及windows兼容图片

This commit is contained in:
Tw93
2023-01-07 21:09:59 +08:00
parent fe36c25548
commit 45d7652c43
2 changed files with 6 additions and 1 deletions

View File

@@ -93,9 +93,14 @@ fn main() -> wry::Result<()> {
None
})
.with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
#[cfg(target_os = "windows")]
let window = {
let icon_path = format!("png/{}_32.ico", package_name);
// 假如没有设置,就使用默认的即可
if !std::path::Path::new(&icon_path).exists() {
icon_path = "png/icon_32.ico";
}
let icon = load_icon(std::path::Path::new(&icon_path));
common_window
.with_decorations(true)