1
0
Jonathan Kelley 3 жил өмнө
parent
commit
ddccc51daf
1 өөрчлөгдсөн 12 нэмэгдсэн , 8 устгасан
  1. 12 8
      examples/tailwind.rs

+ 12 - 8
examples/tailwind.rs

@@ -10,14 +10,18 @@ use dioxus::prelude::*;
 
 fn main() {
     dioxus::desktop::launch_cfg(app, |c| {
-        // we can configure our primary window through the Tauri Config
-        use dioxus::desktop::tao::platform::macos::*;
-        c.with_window(|w| {
-            w.with_fullsize_content_view(true)
-                .with_titlebar_buttons_hidden(false)
-                .with_titlebar_transparent(true)
-                .with_movable_by_window_background(true)
-        })
+        if cfg!(target_os = "macos") {
+            // we can configure our primary window through the Tauri Config
+            use dioxus::desktop::tao::platform::macos::*;
+            c.with_window(|w| {
+                w.with_fullsize_content_view(true)
+                    .with_titlebar_buttons_hidden(false)
+                    .with_titlebar_transparent(true)
+                    .with_movable_by_window_background(true)
+            })
+        } else {
+            c
+        }
     });
 }