mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix: default on linux (#6420)
This commit is contained in:
parent
05cdebd7ec
commit
de2b09785d
@ -21,6 +21,6 @@
|
||||
- 优化切换节点时的延迟
|
||||
- 优化托盘退出快捷键显示
|
||||
- 优化首次启动节点信息刷新
|
||||
- 默认使用内置窗口控件
|
||||
- Linux 默认使用内置窗口控件
|
||||
|
||||
</details>
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user