mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-11 12:25:42 +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> {
|
fn create_window(handle: &tauri::AppHandle) -> tauri::Result<tauri::Window> {
|
||||||
log::info!("Creating window");
|
log::info!("Creating window");
|
||||||
tauri::WindowBuilder::new(handle, "main", tauri::WindowUrl::App("index.html".into()))
|
let window_builder =
|
||||||
.resizable(true)
|
tauri::WindowBuilder::new(handle, "main", tauri::WindowUrl::App("index.html".into()))
|
||||||
.hidden_title(true)
|
.resizable(true)
|
||||||
.theme(Some(tauri::Theme::Dark))
|
.title(app_title())
|
||||||
.min_inner_size(600.0, 300.0)
|
.theme(Some(tauri::Theme::Dark))
|
||||||
.inner_size(800.0, 600.0)
|
.min_inner_size(600.0, 300.0)
|
||||||
.title_bar_style(tauri::TitleBarStyle::Overlay)
|
.inner_size(800.0, 600.0);
|
||||||
.build()
|
|
||||||
|
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<()> {
|
fn hide_window(handle: &tauri::AppHandle) -> tauri::Result<()> {
|
||||||
|
Loading…
Reference in New Issue
Block a user