-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Tooltips of disabled widgets are hard to read because of transparent background #7640
Comments
Thank you. I agree this is an issue. In general, I think nested windows that are not child window shouldn't inherit disabled-ness: ImGui::Begin("Example Bug");
ImGui::BeginDisabled();
ImGui::Begin("Nested window call");
ImGui::End();
ImGui::EndDisabled();
ImGui::End(); |
This is now fixed/supported with f953ebf ! (The "misc_recover" test is also useful for this, for simplicity I had to amend |
Wow, that was quick, thank you very much! :) |
@ocornut Thanks, but non-inheritability of disabled status for root windows can be a drawback.
|
I don’t understand your message. |
My bad. Before I'm opening an issue, let me try to ask this more clearly: (The flag |
It’s mostly a problem of how to design an api for it, but we could provide a bool in imgui_internal.h to provide the features without a public api. |
Frankly, I'd be happier if the DisabledOverrideReenable just would only kick in on the basis of the This would let a programmer free to have both worlds ; global, local to that specific window, or however user is choosing to structure their code. Currently, documentation text of the Disabling API in Thinking about it, a Root window is also an interactive element (collapse button, scrollbar..). |
@d-musique I am not sure it is practical or even functional to use this way. Our current disabling setup increases alpha for everything, which looks remarkably odd on a transparent window. It is also currently possible to move the window, which may or not be a bug. Can you clarify how/why you are using this property? |
I have currently applied suggested logic (with dd5c30d) but I am still a bit undecided and would like further inputs on this. |
…ease_not_owned" Didn't probably update version number at the time of committing ocornut/imgui#7640
Version/Branch of Dear ImGui:
Version 1.90.7
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp (probably all)
Compiler, OS:
Linux + GCC 11.4 (probably all)
Full config/build information:
No response
Details:
Widgets that are disabled (with
ImGui::BeginDisabled()
) can still show tooltips when hovered.This is great, for example to indicate why they're disabled.
However, the background of those tooltips is very translucent, so whatever is under it becomes visible. Especially when there's text under the tooltip, it's hardly readable at all, see screenshot below.
I think that the tooltip background should always be opaque enough so its text can be easily read; probably it should look the same for enabled/disabled items, or otherwise maybe have a gray background (but still with high enough alpha value)
Screenshots/Video:
Tooltip of a disabled button:
![image](https://private-user-images.githubusercontent.com/1216493/335392632-86d8a5fd-9919-48ba-82e0-0d92e4c97525.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjU2MDgsIm5iZiI6MTcyMTQ2NTMwOCwicGF0aCI6Ii8xMjE2NDkzLzMzNTM5MjYzMi04NmQ4YTVmZC05OTE5LTQ4YmEtODJlMC0wZDkyZTRjOTc1MjUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjBUMDg0ODI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTFmY2RmMGJlMmVlNzE3YWE1ZWFhYzliMzkyYjE3YmVkOWRhZjNiY2UzMjlmMmIzMjc2ODczYjQ0YWEzYzg2OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.F0iZ9ACt_-Lq6fmPV-2GWv6D0IM09CR5BMS-rnnpIPY)
For comparison, tooltip when button is not disabled:
![image](https://private-user-images.githubusercontent.com/1216493/335392762-dd678d8f-bfff-4961-9de4-a8f136ef1b82.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjU2MDgsIm5iZiI6MTcyMTQ2NTMwOCwicGF0aCI6Ii8xMjE2NDkzLzMzNTM5Mjc2Mi1kZDY3OGQ4Zi1iZmZmLTQ5NjEtOWRlNC1hOGYxMzZlZjFiODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjBUMDg0ODI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mzc0NDYzMTcyZjEyZWRhZmYyMTFiMzBiZGIzZjQ3OWQzOTAwNzlmZGM0ZmZkODhjZTgwYzAzNDA2NjZlMDM0NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.FRhUewzkoOBjtvY3iaNUKwhBXbupx0ROtwD4geqxEHU)
(Please excuse the ugly handdrawn cursors, for some reason the real cursor wasn't on the screenshots)
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: