🐛 代码格式检查以及windows兼容图片
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user