mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-05 00:15:03 +03:00
only apply macos specific window things on macos
This commit is contained in:
parent
4d3f64d6d9
commit
775d1cd1f3
@ -512,14 +512,22 @@ fn get_window(handle: &tauri::AppHandle) -> Option<tauri::Window> {
|
||||
|
||||
fn create_window(handle: &tauri::AppHandle) -> tauri::Result<tauri::Window> {
|
||||
log::info!("Creating window");
|
||||
tauri::WindowBuilder::new(handle, "main", tauri::WindowUrl::App("index.html".into()))
|
||||
.resizable(true)
|
||||
.hidden_title(true)
|
||||
.theme(Some(tauri::Theme::Dark))
|
||||
.min_inner_size(600.0, 300.0)
|
||||
.inner_size(800.0, 600.0)
|
||||
.title_bar_style(tauri::TitleBarStyle::Overlay)
|
||||
.build()
|
||||
let window_builder =
|
||||
tauri::WindowBuilder::new(handle, "main", tauri::WindowUrl::App("index.html".into()))
|
||||
.resizable(true)
|
||||
.title(app_title())
|
||||
.theme(Some(tauri::Theme::Dark))
|
||||
.min_inner_size(600.0, 300.0)
|
||||
.inner_size(800.0, 600.0);
|
||||
|
||||
if cfg!(target_os = "macos") {
|
||||
window_builder
|
||||
.hidden_title(true)
|
||||
.title_bar_style(tauri::TitleBarStyle::Overlay)
|
||||
.build()
|
||||
} else {
|
||||
window_builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
fn hide_window(handle: &tauri::AppHandle) -> tauri::Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user