Compare commits
3 Commits
0306842284
...
1662fbab2b
| Author | SHA1 | Date | |
|---|---|---|---|
| 1662fbab2b | |||
| 0eb0b223a2 | |||
| 524fa61c01 |
@@ -63,6 +63,10 @@ jobs:
|
||||
$ver = '${{ needs.prepare.outputs.version }}'
|
||||
node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));d.version='$ver';fs.writeFileSync('src-tauri/tauri.conf.json',JSON.stringify(d,null,2),'utf8');"
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
|
||||
- name: Install frontend deps
|
||||
shell: powershell
|
||||
run: cd cinny; npm ci
|
||||
@@ -77,6 +81,13 @@ jobs:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''
|
||||
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||
# Sparse registry avoids a full git clone of the crates.io index —
|
||||
# eliminates the curl SSL handshake failures seen on Windows runners.
|
||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||
# Disable HTTP/2 multiplexing — ALPN negotiation can reset on Windows Schannel.
|
||||
CARGO_HTTP_MULTIPLEXING: 'false'
|
||||
# Retry transient network errors before failing.
|
||||
CARGO_NET_RETRY: '5'
|
||||
run: npm run tauri -- build --bundles nsis
|
||||
|
||||
- name: Upload to release
|
||||
|
||||
+1
-1
Submodule cinny updated: 388a934665...107921e0d0
+15
-2
@@ -162,7 +162,7 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
|
||||
let mut label_wide: Vec<u16> = label.encode_utf16().chain(std::iter::once(0)).collect();
|
||||
|
||||
unsafe {
|
||||
let size = 16i32;
|
||||
let size = 20i32;
|
||||
let hdc_screen = windows::Win32::Graphics::Gdi::GetDC(None);
|
||||
let hdc = CreateCompatibleDC(Some(hdc_screen));
|
||||
|
||||
@@ -191,7 +191,7 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
|
||||
let _ = Ellipse(hdc, 0, 0, size, size);
|
||||
|
||||
let hfont = CreateFontW(
|
||||
11,
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -226,6 +226,19 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
|
||||
let _ = DeleteObject(hpen.into());
|
||||
let _ = DeleteObject(hfont.into());
|
||||
|
||||
// GDI drawing leaves the alpha channel at 0 for all pixels.
|
||||
// Set alpha=255 for every painted pixel so Windows uses per-pixel
|
||||
// alpha compositing instead of falling back to the opaque mask,
|
||||
// which would render unpainted corner pixels as a black square.
|
||||
let pixel_count = (size * size) as usize;
|
||||
let pixels =
|
||||
std::slice::from_raw_parts_mut(bits as *mut u32, pixel_count);
|
||||
for pixel in pixels.iter_mut() {
|
||||
if *pixel != 0 {
|
||||
*pixel |= 0xFF00_0000u32;
|
||||
}
|
||||
}
|
||||
|
||||
let hbm_mask = CreateBitmap(size, size, 1, 1, None);
|
||||
if hbm_mask.0 as usize == 0 {
|
||||
let _ = DeleteObject(hbm_color.into());
|
||||
|
||||
Reference in New Issue
Block a user