Repository navigation
Allow starting selections from padding area - #6343
2 commits merged into
Conversation
Marking as ready for review. The issue above just exposes #5099 more. I'm working on that for this milestone anyways. |
fceab19 to
0b2564d
Compare
Dustin L. Howett (DHowett)
left a comment
There was a problem hiding this comment.
I don't understand exactly what's going on here. Can you explain who owns the padding and the margin now? You've removed the SwapChainPanel's margin from calculations, but you're .. still setting it? And the grid that is receiving input doesn't have a margin OR padding?
Can you still click in Search, even when MC is running?
When a user interacts with that newly added space, you are not hitting SCP. So, you instead hit the parent (Grid). So I moved the pointer handlers up to the parent. Now, if you click on...
The last bit is that to actually pass a hit test, you need to be "visible". So, I made Grid Visible and Transparent.
Works as expected :) mouse input is handled on the Search Box and does not leak through to the underlying MC. But if I click on MC while the Search Box is open, focus moves to MC and you actually interact with MC (same as before). |
|
Hello Dustin L. Howett (@DHowett)! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
🎉 Handy links: |
WinUI's
MarginandPaddingwork very similarly.Margindistancesourselves from our parent. Whereas
Paddingdistances our children fromourselves.
Terminal's
paddingsetting is actually implemented by definingMarginon the SwapChainPanel. This means that the "padding" that iscreated is actually belongs to SwapChainPanel's parent: Grid (not to be
confused with its parent, "RootGrid").
When a user clicks on the padded area, input goes to Grid. But there's a
twist: you can't actually hit Grid. To be able to hit Grid, you can't
just set IsHitTestVisible. You need to set it's Visibility to Visible,
and it's Background to Transparent (not null) [2].
Validation Steps Performed
to the SwapChainPanel
References
[1] https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.ishittestvisible
[2] https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/events-and-routed-events-overview#hit-testing-and-input-events
Closes #5626