-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Have a border only around active widgets #4050
Comments
I do not believe this is something you can easily do today. If you're willing to modify Dear ImGui slightly, you can get something close to this using the navigation highlights by removing these two lines from Lines 2858 to 2859 in 936f532
(That Here it is with the filter colors box active and a red highlight border: If you want to eliminate that padding or change the thickness, you'd have to further modify Worth noting though that depending on how picky you are, the widget with navigation focus may not always match your expectation. For example, when you expect a dropdown the hovered item has navigation focus and the dropdown does not: |
Hello, Note that "Active" and "Focused" are very different concepts in dear imgui terminology.
For that later thing: the navigation system was originally introduced with the expectation that dear imgui is used as an overlay over an application that already has input going on. so there was a bias toward being able to relinguish keyboard capture (using ESC). Nowadays we have application types that may want to never disable navigation/capture keyboard and never lose that highlight, so those are options we should be adding provided the right design. I suspect it will still be crucial to allow people to unfocus a window and give inputs back to underlying application, but maybe the nav highlight will stay displayed just with a different "unfocused" color. |
Thanks, @ocornut, and @PathogenDavid for your help. |
I am using Dear ImGui in my engine for about a year now and today I was spending some time with styles.
I made my UI look like this:
That border looks like macOS and IntelliJ's dark theme.
But it looks very bad when all widgets have that border.
I want the border to be only enabled (visible) around "active" (focused) widgets.
Can anyone help me with that?
Thanks for the awesome library btw.
The text was updated successfully, but these errors were encountered: