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

Gui: Fix black tooltip #13649

Closed
wants to merge 1 commit into from
Closed

Conversation

wwmayer
Copy link
Contributor

@wwmayer wwmayer commented Apr 25, 2024

The QTreeView of the preferences dialog has a transparent background and this somehow causes the tooltips to have black background with black text so that it's not readable.

Overriding the helpEvent() of the delegate class and handling the tooltip slightly different fixes the problem. All what's needed is to not pass the view as 3rd argument

The QTreeView of the preferences dialog has a transparent background and this somehow causes the tooltips to have black background
with black text so that it's not readable.

Overriding the helpEvent() of the delegate class and handling the tooltip slightly different fixes the problem. All what's needed
is to not pass the view as 3rd argument
@github-actions github-actions bot added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Apr 25, 2024
@kadet1090
Copy link
Contributor

kadet1090 commented Apr 28, 2024

@wwmayer I fixed the same issue just rearranging styles in the .ui file by targeting exact controls instead of setting stylesheet on them: #13663. For me this seems as less hacky solution.

According to the docs it should not behave this way, but for some reason it does: https://doc.qt.io/qt-6/stylesheet-syntax.html#cascading

@wwmayer
Copy link
Contributor Author

wwmayer commented Apr 28, 2024

Thanks. I have tried your changes and it fixes the tooltips. However, now I get this warning in the output window:
Could not parse stylesheet of object Gui::Dialog::DlgPreferencesImp(0x7fff41443f98, name = "Gui__Dialog__DlgPreferences")

@kadet1090
Copy link
Contributor

That is strange, especially that the stylesheet is applied correctly. It was the stray ; at the end of stylesheet - I'll fixup mine PR to get rid of it.

@wwmayer
Copy link
Contributor Author

wwmayer commented Apr 28, 2024

Yes, it was the semicolon at the wrong position. Now it works correctly.

@chennes
Copy link
Member

chennes commented Apr 28, 2024

Is this PR superseded by #13663?

@kadet1090
Copy link
Contributor

Imho yes, this can cause other side effects as it detaches tooltip rendering from the usual pipeline.

@wwmayer
Copy link
Contributor Author

wwmayer commented Apr 29, 2024

Superseded by #13663

@wwmayer wwmayer closed this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants