Repository navigation
fix(overlay): map tooltips with the overlay's own DPI and live origin - #77
Merged
Merged
Conversation
Scan positions are physical pixels; the overlay page converted them to CSS pixels with SettingsVM.ScreenScale, which is the game display's DPI, a custom display-scale override, or even an unsaved settings draft. The overlay's CSS pixels follow the overlay window's DPI instead, so on mixed-DPI setups or with a custom scale, tooltips drifted away from the item (growing with distance from the virtual-screen origin). VirtualScreenOffset was also computed once at startup and went stale when monitors changed, while the window itself was re-sized every show. - The overlay records its virtual-screen origin and GetDpiForWindow scale every time it is sized for a tooltip, and on DpiChanged. - The overlay page scales by that DPI and re-renders when it changes. Claude-Session: https://claude.ai/code/session_01QFKiA2aswHyp8SnpraLxE2
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 23 minutes. View limit details
|
…/overlay-review-77
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
Scan positions are physical pixels, while the overlay WebView follows the overlay window's DPI. Using game-display settings or an unsaved settings preview to scale those coordinates shifts tooltips when those scales differ. A startup-only virtual-screen origin also becomes stale after monitors are rearranged.
VirtualScreenOffset, updated by the overlay after sizing for each tooltip show and onDpiChanged.DeviceScale; subscribe to mapping changes and remove theSettingsVM.ScreenScaledependency.Validation
8b14f5f817ca3b3661f98761168204468eda773dincorporates master80b7ee603205841a7d9d5c3a30cb57f291495f6dand its standalone engine revision without overlay conflicts.scripts/verify.ps1 -Mode Fast: passed; Debug build 0 warnings/errors; 434 unit tests passed, 6 optional local-fixture tests skipped.scripts/verify.ps1 -Mode Ui: 2/2 hosted WebView smoke tests passed. Visually inspecteddesktop-scan.pngandnarrow-settings.pngunderartifacts/ui-tests/20261102-035839-45216-179a1178fe294d9b8e5bc61e75826625/.Limits