🐛 代码格式检查以及windows兼容图片
This commit is contained in:
@@ -38,7 +38,7 @@ jobs:
|
|||||||
tool: cargo-hack,nextest
|
tool: cargo-hack,nextest
|
||||||
- name: Install dependencies for Ubuntu
|
- name: Install dependencies for Ubuntu
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
uses: awalsh128/cache-apt-pkgs-action@1.2.0
|
||||||
with:
|
with:
|
||||||
packages: >
|
packages: >
|
||||||
libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev
|
libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev
|
||||||
|
|||||||
@@ -93,9 +93,14 @@ fn main() -> wry::Result<()> {
|
|||||||
None
|
None
|
||||||
})
|
})
|
||||||
.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 window = {
|
let window = {
|
||||||
let icon_path = format!("png/{}_32.ico", package_name);
|
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));
|
let icon = load_icon(std::path::Path::new(&icon_path));
|
||||||
common_window
|
common_window
|
||||||
.with_decorations(true)
|
.with_decorations(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user