-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Added WindowManagerAddShadowHint to PopupRoot. #15238
Conversation
@@ -50,6 +56,7 @@ public PopupRoot(TopLevel parent, IPopupImpl impl, IAvaloniaDependencyResolver? | |||
: base(impl, dependencyResolver) | |||
{ | |||
ParentTopLevel = parent; | |||
impl.SetWindowManagerAddShadowHint(WindowManagerAddShadowHint); |
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.
This isn't ideal but the default value of false
for this property appears to be different to the default value implemented in the win32 backend (true
), so this is needed to communicate the actual default. I could change the backend but didn't really want to mess with that here quite honestly.
You can test this PR using the following package version. |
I would argue that third parties should not use PopupRoot ever. And we should make Popup api better (as well as rebase Tooltips on top of Popups). But this PR is reasonable by itself. |
Yeah, probably. But at least with 11.x |
What does the pull request do?
Previously, the
WindowManagerAddShadowHint
property was defined onPopup
andContextMenu
but notPopupRoot
: instead various controls such as the aforementioned two andToolTip
used thePopupRoot.PlatformImpl.SetWindowManagerAddShadowHint
internal method to set the "add shadow" hint. This had the downside that 3rd parties could not set this property when usingPopupRoot
directly.This PR adds a
WindowManagerAddShadowHint
property toPopupRoot
and makes the controls that previously used the internal interface use that property instead.