Allow enabling or disabling custom decorations on windows

This commit is contained in:
Lncvrt committed 2026-09-27 18:46:00 -07:00
1 parent 84e45bf408
commit 11d695d50a
9 files changed
+139 -68

No files matched your search

+15 -8
View File
@@ -674,6 +674,19 @@ fn remove_stale_executable(app: AppHandle, version: String, executable: String)
}
}
#[allow(unused)]
#[tauri::command]
fn enable_custom_decorations_windows(app: AppHandle) {
#[cfg(target_os = "windows")]
{
use tauri_plugin_decorum::WebviewWindowExt;
let window = app.get_webview_window("main").unwrap();
window.set_decorations(false);
let _ = window.create_overlay_titlebar();
}
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
#[allow(unused)]
@@ -714,7 +727,8 @@ pub fn run() {
cancel_download,
move_game_data,
open_game_folder,
remove_stale_executable
remove_stale_executable,
enable_custom_decorations_windows
])
.setup(|app| {
let custom_dir = app
@@ -745,13 +759,6 @@ pub fn run() {
}
});
#[cfg(target_os = "windows")]
{
use tauri_plugin_decorum::WebviewWindowExt;
if let Err(e) = window.create_overlay_titlebar() {
eprintln!("Failed to create overlay titlebar: {:?}", e);
}
}
#[cfg(not(debug_assertions))]
{
use tauri_plugin_cli::CliExt;
+1 -3
View File
@@ -18,9 +18,7 @@
"width": 1000,
"height": 532,
"minWidth": 1000,
"minHeight": 532,
"decorations": false,
"shadow": true
"minHeight": 532
}
],
"security": {