Skip to content

fix(window): Refactor window size and position to use LogicalSize and LogicalPosition#1072

Open
9Ninety wants to merge 1 commit into
pot-app:masterfrom
9Ninety:master
Open

fix(window): Refactor window size and position to use LogicalSize and LogicalPosition#1072
9Ninety wants to merge 1 commit into
pot-app:masterfrom
9Ninety:master

Conversation

@9Ninety
Copy link
Copy Markdown

@9Ninety 9Ninety commented Mar 29, 2025

TLDR: This commit ensures that Pot has the same size on monitors with different scale ratios. It no longer becomes progressively smaller on non-primary monitors with smaller scale ratios.


This commit refactors the window size and position calculations in src-tauri/src/window.rs to use LogicalSize and LogicalPosition instead of PhysicalSize and PhysicalPosition.

This change ensures that the window size and position are independent of the screen's DPI, leading to a more consistent user experience across different displays. The DPI scaling is now handled internally by Tauri.

Fix #962

… LogicalPosition

This commit refactors the window size and position calculations in `src-tauri/src/window.rs` to use `LogicalSize` and `LogicalPosition` instead of `PhysicalSize` and `PhysicalPosition`. This change ensures that the window size and position are independent of the screen's DPI, leading to a more consistent user experience across different displays. The DPI scaling is now handled internally by Tauri.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: 关于记住窗口大小的BUG

1 participant