-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
FancyZones editor magnetic snapping effect #1277
Conversation
2a8ea69
to
f913c5d
Compare
let’s hold on merging until 0.15 ships please |
Yes, sure. |
Implemented a solution to Issue microsoft#585: FancyZones: Alignment/Snapping/Ruler
74b0660
to
7903445
Compare
* Getting ready for v0.15 update for readme. * getting ready for 0.15 * spelling tweak * filled in update section * fixed spelling mistakes * updating to what POR is * Update README.md * Update README.md * adding back in MSI * getting readme ready for 0.15 * tweaks * adding oss to oss links * fixing links * tweaking file names * Update README.md * Update README.md * Update README.md fixing typo * Update README.md
* Fix migrating never applied custom zonesets * Handle json parsing exception in LoadCustomModels()
* adding preview tag for desktop and start menu * getting to load, code from wixtoolset/issues#5700 (comment)
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
* Fix PowerRename UI doesn't handling DPI changes * Address PR comments * Address PR comments
Fixed an issue (microsoft#365) where a window gets resized after it gets dropped into a zone.
…#1458) * Fixed an issue where zones do not fill up the whole screen * Fixup: Added comments, removed extra semicolons
* Update dllmain.cpp * Update dllmain.cpp
* Switch WindowWalker C# project to use PackageReference * Remove packages.config leftovers Co-authored-by: William Kent <[email protected]>
} | ||
|
||
private void SWResize_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e) | ||
private Settings _settings = ((App)Application.Current).ZoneSettings; |
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.
_settings
is not used anymore, right?
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.
Yes, that can safely be removed.
/// Just pass it the canvas arguments. Use mode | ||
/// to tell it which edges of the existing masks to use when building its list | ||
/// of snap points, and generally which edges to track. There will be two | ||
/// SnappyHelpers, one for X-coordinates and one for | ||
/// Y-coordinates, they work independently but share the same logic. |
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.
Better formatting:
/// Just pass it the canvas arguments. Use mode to tell it which edges
/// of the existing masks to use when building its list of snap points,
/// and generally which edges to track. There will be two SnappyHelpers,
/// one for X-coordinates and one for Y-coordinates, they work
/// independently but share the same logic.
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.
Agreed, I'll unindent these 5 lines.
@ivan100sic |
ModeLow = 1, | ||
ModeHigh = 2, | ||
ModeBoth = 3, |
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.
Since the enum already states that this is the ResizeMode, I would suggest to rename the values to:
- BottomEdge
- TopEdge
- BothEdges
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.
Perhaps LowEdge, HighEdge, BothEdges?
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.
Top and Bottom are better terms in this case.
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.
Or are these referring to the Y axis as well?
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.
They are used in both X and Y axes.
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.
In case of Y, top edge is the left edge, correct?
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs
Outdated
Show resolved
Hide resolved
Implemented a solution to Issue microsoft#585: FancyZones: Alignment/Snapping/Ruler
…/PowerToys into snapping-improved-new
I messed up the history on this branch, so I'm closing this pull request in favor of #1503 |
Implemented a solution to Issue #585: FancyZones: Alignment/Snapping/Ruler
Summary of the Pull Request
This PR implements one aspect of Issue #585. Now, windows in the Canvas zone editor will snap to each other when being moved and resized.
References
PR Checklist
Detailed Description of the Pull Request / Additional comments
There are two implementations of snapping available, but only one is being used.
Validation Steps Performed
Manually tested the Canvas zone editor in various scenarios.