summaryrefslogtreecommitdiffhomepage
path: root/packages/tauri/src-tauri/src
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2025-12-12 23:37:17 +0800
committerGitHub <[email protected]>2025-12-12 09:37:17 -0600
commit59d4041aa4221e4fbb2f347ee5b8e82eb82e434a (patch)
tree3c29957cd3bc966778261beb19e73bcfa2e631b8 /packages/tauri/src-tauri/src
parentfeb8c4f3c60e1ada28bd24abd09d534375a6bc08 (diff)
downloadopencode-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.rs6
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__ ??= {{}};