fix: default on linux (#6420)

This commit is contained in:
Slinetrac
2026-03-04 11:53:25 +00:00
committed by GitHub
parent 05cdebd7ec
commit de2b09785d
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -21,6 +21,11 @@ const DEFAULT_HEIGHT: f64 = 700.0;
const MINIMAL_WIDTH: f64 = 520.0;
const MINIMAL_HEIGHT: f64 = 520.0;
#[cfg(target_os = "linux")]
const DEFAULT_DECORATIONS: bool = false;
#[cfg(not(target_os = "linux"))]
const DEFAULT_DECORATIONS: bool = true;
/// 构建新的 WebView 窗口
pub async fn build_new_window() -> Result<WebviewWindow, String> {
let app_handle = handle::Handle::app_handle();
@@ -61,8 +66,7 @@ pub async fn build_new_window() -> Result<WebviewWindow, String> {
)
.title("Clash Verge")
.center()
// Default to custom titlebar; users can switch to system titlebar in settings.
.decorations(false)
.decorations(DEFAULT_DECORATIONS)
.fullscreen(false)
.inner_size(DEFAULT_WIDTH, DEFAULT_HEIGHT)
.min_inner_size(MINIMAL_WIDTH, MINIMAL_HEIGHT)