Skip to content
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

[WIP] Fix Completion Tooltip Placement #386

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

HendrikMennen
Copy link
Contributor

@HendrikMennen HendrikMennen commented Dec 8, 2023

EDIT

I noticed in some cases with long completionlists this does not work well, I will try to find another way.

When scrolling down the tooltip position cannot always be taken from the container, because the container is not always generated at this point. I fixed this by simply placing the tooltip to the bottom whenever this happens.

Current Behaviour:

image

Expected:

image

@HendrikMennen HendrikMennen changed the title Fix Completion Tooltip Placement [WIP] Fix Completion Tooltip Placement Dec 9, 2023
Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like it new or old code shouldn't be necessary, if we set tooltip on the specific ListBoxItem with right placement mode. But either way, a new code looks like a reasonable workaround.

@HendrikMennen
Copy link
Contributor Author

Feels like it new or old code shouldn't be necessary, if we set tooltip on the specific ListBoxItem with right placement mode. But either way, a new code looks like a reasonable workaround.

I already tried setting the tooltip to the ListBoxItem directly, and used it this way for some time in my own fork, but this caused another issue:
When the ListBoxItem is very long, that it enables horizontal scrolling, the tooltip will float far offscreen.
image
The only way I know to fix this would be with calculating an offset, any different idea?

@danipen danipen merged commit be8fc93 into AvaloniaUI:master Dec 9, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants