-
Notifications
You must be signed in to change notification settings - Fork 187
Reorganized monitor-bound utils in Tree #2154
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
Reorganized monitor-bound utils in Tree #2154
Conversation
03834e3 to
e7b3a0c
Compare
e7b3a0c to
8411dc7
Compare
2c65bce to
44c215e
Compare
44c215e to
64fb36e
Compare
HeikoKlare
left a comment
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.
The overall change looks fine. In my understanding, this is not a pure refactoring but adds some additional functionality in MultiZoomCoordinateSystemMapper::getContainingMonitorBoundsInPixels(Point) for the case that the given point is not monitor-aware, right? But in my understanding that is rather a fallback as that path will currently not be taken as only the cursor location is passed to the method which, in case a multi-zoom mapper is used, will always be a monitor-aware point.
In addition to that, there seem to be some missing / lost null checks.
...g.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MultiZoomCoordinateSystemMapper.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
Show resolved
Hide resolved
ce55334 to
f96c653
Compare
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
Outdated
Show resolved
Hide resolved
This commit contributes to moving Tree:getContainingMonitorBoundsInPixels and Tree:fitRectangleBoundsIntoMonitor to CoordinateSystemMapper and Display, respectively for better clarity and encapsulation. contributes to eclipse-platform#62 and eclipse-platform#128
f96c653 to
fd93049
Compare
HeikoKlare
left a comment
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.
Looks good now, thank you! I also tested the changes and did not find any regressions. In particular, the tooltip alignment of trees to fit into the monitor still works as expected.
This commit contributes to moving
Tree:getContainingMonitorBoundsInPixels and
Tree:fitRectangleBoundsIntoMonitor to CoordinateSystemMapper and Display,
respectively for better clarity and encapsulation.
contributes to
#62 and
#128