Skip to content

Tooltip & Hover Fix #57

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

Merged
merged 2 commits into from
Mar 25, 2024
Merged

Tooltip & Hover Fix #57

merged 2 commits into from
Mar 25, 2024

Conversation

brachy84
Copy link
Member

Before tooltips ignored the widgets transformations. This caused the tooltip to be offset in scrolling widgets. Now the widgets transormations are applied when drawing widgets in foreground. This also means that you can no longer attach the tooltip to another widget or area exclusionArea. The tooltip will now show up around the transformed widget without any transformations applied to it except the true pos and size of the widget.

canHover() in ParentWidget returns true when it as a background, hover background/overlay or tooltip. But some widgets like panels get their background from the current theme when they dont have any. This caused the widget to not be detected as hovered and instead could hover widgets below that widget. This pr fixes it by checking if the current widget theme has any background.

Closes #54

@brachy84 brachy84 merged commit 68d2799 into master Mar 25, 2024
@brachy84 brachy84 deleted the tooltip branch March 25, 2024 10:03
miozune pushed a commit to GTNewHorizons/ModularUI2 that referenced this pull request Aug 11, 2024
* fix tooltip ignoring transformations

* fix parent widgets not being hovered when they get background from theme

(cherry picked from commit 68d2799)
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.

Mouse on overlay panel affect elements under panel
1 participant