mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-07 10:16:03 -10:00
fix(windows): center the main window on startup (#1664)
This commit is contained in:
2 files changed
+11
-1
No files matched your search
+10
-1
@@ -252,7 +252,16 @@ pub fn run() {
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn window_state_flags() -> tauri_plugin_window_state::StateFlags {
|
||||
use tauri_plugin_window_state::StateFlags;
|
||||
StateFlags::SIZE | StateFlags::POSITION | StateFlags::MAXIMIZED | StateFlags::FULLSCREEN
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
// Start at the configured size, centered, instead of restoring geometry after the
|
||||
// window is visible (Windows briefly showed the default position before that move).
|
||||
StateFlags::MAXIMIZED | StateFlags::FULLSCREEN
|
||||
}
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
{
|
||||
StateFlags::SIZE | StateFlags::POSITION | StateFlags::MAXIMIZED | StateFlags::FULLSCREEN
|
||||
}
|
||||
}
|
||||
|
||||
/// Routes IDE menu items to the focused window's frontend (`executeAction`).
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"title": "OpenIDEA",
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"center": true,
|
||||
"minWidth": 800,
|
||||
"minHeight": 500,
|
||||
"decorations": false,
|
||||
|
||||
Reference in new issue
Block a user