-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use logical pixels for popover offset calculation #84
Conversation
WalkthroughThis update revises the calculation of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- lib/src/utils/popover_utils.dart (1 hunks)
Additional comments: 1
lib/src/utils/popover_utils.dart (1)
- 37-38: The calculation of
physicalSize
now correctly accounts for the device pixel ratio by dividing the physical size by the device pixel ratio. This change ensures that offset calculations for popovers are based on logical pixels, which is crucial for correct display on high-DPI screens. Ensure that all usages ofphysicalSize
within the application have been updated to reflect this change in calculation.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
==========================================
+ Coverage 91.81% 91.83% +0.01%
==========================================
Files 9 9
Lines 440 441 +1
==========================================
+ Hits 404 405 +1
Misses 36 36 ☔ View full report in Codecov by Sentry. |
@zwett, thank you for your contribution! |
@minikin Definitely! Thanks for taking the time to check it out thoroughly. I'll look into it and get back to you with a fix asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- lib/src/utils/popover_utils.dart (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- lib/src/utils/popover_utils.dart
@minikin Switching resize-popover-position.mp4 |
@zwett, it works, thank you 🚀 I'll release a new version tomorrow. |
Fixed popover cut-off issue by adjusting
physicalSize
inPopoverUtils
to account fordevicePixelRatio
. This way, on high-DPI screens, the popover uses logical pixels for offset calculation.physicalSize
physicalSize / devicePixelRatio
Closes
Summary by CodeRabbit