-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Allow ColorPicker-Fylout to swap position if needed #13567
Merged
timunie
merged 4 commits into
AvaloniaUI:master
from
timunie:fix/ColorPickerFlyoutPosition
Nov 13, 2023
Merged
Fix: Allow ColorPicker-Fylout to swap position if needed #13567
timunie
merged 4 commits into
AvaloniaUI:master
from
timunie:fix/ColorPickerFlyoutPosition
Nov 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds much more flexibility to control flyout positioning when there is not enough space to show the Flyout.
This allows the position to be overridden easily. It should no longer be hard coded.
Thanks for opening this! It is probably best to do something along these lines first to close the original issue. |
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
robloo
reviewed
Nov 10, 2023
MrJul
reviewed
Nov 11, 2023
MrJul
approved these changes
Nov 13, 2023
robloo
reviewed
Nov 13, 2023
@@ -50,7 +52,8 @@ | |||
</Style> | |||
</DropDownButton.Styles> | |||
<DropDownButton.Flyout> | |||
<Flyout Placement="Top"> | |||
<Flyout FlyoutPresenterClasses="nopadding" |
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.
Are you sure this is defined for simple theme? It was likely not set on purpose.
Lol, nevermind. I should have just looked up a few lines. Good catch.
3 tasks
maxkatz6
pushed a commit
that referenced
this pull request
Dec 5, 2023
* Add `PlacementConstraintAdjustmentProperty` to PopupFlyoutBase This adds much more flexibility to control flyout positioning when there is not enough space to show the Flyout. * Make Fylout position of the ColorPicker a DynamicResource This allows the position to be overridden easily. It should no longer be hard coded. * Address review
robloo
added a commit
to robloo/FluentAvalonia
that referenced
this pull request
Apr 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the pull request do?
Makes it easier to handle the ColorPicker-Flyout and also other Flyouts. The ColorView should no longer hide the Button if the free space is not enough to show the Fylout. Also the hard-coded positioning was changed into a
DynamicResource
in order to make adjustments easier.What is the current behavior?
See #13550
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Added
PlacementConstraintAdjustment
-Property toPopupFyloutBase
in order to configure adjustments. Before it was hard-coded to Slide.Checklist
Breaking changes
Technically it is a behavior change das now the Flyout will flip position instead of slide. However in most use-cases the flip operation is preferred. Still this can be reverted if we specify the old values as default. Let me know your thoughts.
Obsoletions / Deprecations
Fixed issues
Fixes #13550
/cc @robloo