mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-17 22:00:40 -07:00
Enhance icon generation and update dependencies
- Added support for generating a multi-size Windows icon (icon.ico) in the update-icons.sh script. - Updated Cargo.toml to include the 'windows' crate with specific features for Windows support. - Bumped version of the 'voicebox' package from 0.1.0 to 0.1.1 in Cargo.lock. - Updated .gitignore to exclude the generated Assets.car file.
This commit is contained in:
@@ -384,6 +384,24 @@ pub fn run() {
|
||||
#[cfg(desktop)]
|
||||
app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||
|
||||
// Hide title bar icon on Windows
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use windows::Win32::Foundation::HWND;
|
||||
use windows::Win32::UI::WindowsAndMessaging::{SetClassLongPtrW, GCLP_HICON, GCLP_HICONSM};
|
||||
|
||||
if let Some((_, window)) = app.webview_windows().iter().next() {
|
||||
if let Ok(hwnd) = window.hwnd() {
|
||||
let hwnd = HWND(hwnd.0);
|
||||
unsafe {
|
||||
// Set both small and regular icons to NULL to hide the title bar icon
|
||||
SetClassLongPtrW(hwnd, GCLP_HICON, 0);
|
||||
SetClassLongPtrW(hwnd, GCLP_HICONSM, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
// Get all windows and open devtools on the first one
|
||||
|
||||
Reference in New Issue
Block a user