diff options
| author | Brendan Allan <[email protected]> | 2025-12-12 23:37:17 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-12 09:37:17 -0600 |
| commit | 59d4041aa4221e4fbb2f347ee5b8e82eb82e434a (patch) | |
| tree | 3c29957cd3bc966778261beb19e73bcfa2e631b8 /packages/tauri/src-tauri/src | |
| parent | feb8c4f3c60e1ada28bd24abd09d534375a6bc08 (diff) | |
| download | opencode-59d4041aa4221e4fbb2f347ee5b8e82eb82e434a.tar.gz opencode-59d4041aa4221e4fbb2f347ee5b8e82eb82e434a.zip | |
tauri: add basic custom titlebar (#5438)
Diffstat (limited to 'packages/tauri/src-tauri/src')
| -rw-r--r-- | packages/tauri/src-tauri/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/tauri/src-tauri/src/lib.rs b/packages/tauri/src-tauri/src/lib.rs index eb712235e..fea3addb5 100644 --- a/packages/tauri/src-tauri/src/lib.rs +++ b/packages/tauri/src-tauri/src/lib.rs @@ -4,7 +4,9 @@ use std::{ sync::{Arc, Mutex}, time::{Duration, Instant}, }; -use tauri::{AppHandle, LogicalSize, Manager, Monitor, RunEvent, WebviewUrl, WebviewWindow}; +use tauri::{ + AppHandle, LogicalSize, Manager, Monitor, RunEvent, TitleBarStyle, WebviewUrl, WebviewWindow, +}; use tauri_plugin_dialog::{DialogExt, MessageDialogButtons, MessageDialogResult}; use tauri_plugin_shell::process::{CommandChild, CommandEvent}; use tauri_plugin_shell::ShellExt; @@ -107,6 +109,7 @@ pub fn run() { let updater_enabled = option_env!("TAURI_SIGNING_PRIVATE_KEY").is_some(); let mut builder = tauri::Builder::default() + .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_window_state::Builder::new().build()) .plugin(tauri_plugin_store::Builder::new().build()) .plugin(tauri_plugin_dialog::init()) @@ -180,6 +183,7 @@ pub fn run() { .inner_size(size.width as f64, size.height as f64) .decorations(true) .zoom_hotkeys_enabled(true) + .title_bar_style(TitleBarStyle::Overlay) .initialization_script(format!( r#" window.__OPENCODE__ ??= {{}}; |
