дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(windows): center the main window on startup (#1664)
Цей коміт міститься в:
2 files changed
+11
-1
No files matched your search
@@ -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`).
|
||||
|
||||
Reference in new issue
Заблокувати користувача