You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
DPG themes provide a nice mechanism to customize look & feel both on individual widgets and on the whole app. Unfortunately the themes are only applied when DPG itself renders widgets. There are things that Dear ImGui renders on its own, and at that moment even the theme passed in bind_theme is not applied.
This includes the window switching panel that appears when you press Ctrl-Tab (currently you need keyboard_navigation=True for this to work; #2275 will make this independent of keyboard_navigation). The window is not affected by bind_theme and may look significantly different from the rest of UI. It also includes the shadows and the frame this switching mechanism draws around the current window.
Other elements not affected by bind_theme are:
tool windows like show_style_editor - though for these, it might make sense to leave them unaffected? (like, the item registry window uses a hardcoded purple color that looks good in the default dark theme, but might be unreadable if the theme is changed to the light one).
show_imgui_demo() - for this one, it doesn't matter much whether we style it or not.
something else I missed?
So my primary concern is that Ctrl-Tab panel. It would be great to have bind_theme affect this panel but not tool windows; if tool windows can't be left with their own style, so be it, we can sacrifice them.
Within the Ctrl-Tab panel, the thing that mostly stands out is selection color - when your entire app uses blue for selected items, it's hard to see the dark-grey-on-black selection in that panel.
Describe the solution you'd like
The easiest (in terms of API) would be to have bind_theme modify ImGui styles globally and never pop its changes back. This, however, might need some changes in how themes apply their styles (change push/pop to direct assignment for the global theme).
Describe alternatives you've considered
None. Well, one could handle Ctrl-Tab on their own and render the switcher using DPG... but that doesn't sound sane.
Additional context
The text was updated successfully, but these errors were encountered:
Found one more side effect of how the global theme works in DPG: when a window is docked, some colors come from ImGui style variables rather than from DPG themes. This issue was initially reported on Discord - see this thread.
Here's what it looks like:
Some UI elements for the docked windows, in particular, the tab bar, are rendered from within ImGui::NewFrame(), where the global theme has not applied its colors yet. Here's the call chain that finally draws the tab bar:
Is your feature request related to a problem? Please describe.
DPG themes provide a nice mechanism to customize look & feel both on individual widgets and on the whole app. Unfortunately the themes are only applied when DPG itself renders widgets. There are things that Dear ImGui renders on its own, and at that moment even the theme passed in
bind_theme
is not applied.This includes the window switching panel that appears when you press Ctrl-Tab (currently you need
keyboard_navigation=True
for this to work; #2275 will make this independent ofkeyboard_navigation
). The window is not affected bybind_theme
and may look significantly different from the rest of UI. It also includes the shadows and the frame this switching mechanism draws around the current window.Other elements not affected by
bind_theme
are:show_style_editor
- though for these, it might make sense to leave them unaffected? (like, the item registry window uses a hardcoded purple color that looks good in the default dark theme, but might be unreadable if the theme is changed to the light one).show_imgui_demo()
- for this one, it doesn't matter much whether we style it or not.So my primary concern is that Ctrl-Tab panel. It would be great to have
bind_theme
affect this panel but not tool windows; if tool windows can't be left with their own style, so be it, we can sacrifice them.Within the Ctrl-Tab panel, the thing that mostly stands out is selection color - when your entire app uses blue for selected items, it's hard to see the dark-grey-on-black selection in that panel.
Describe the solution you'd like
The easiest (in terms of API) would be to have
bind_theme
modify ImGui styles globally and never pop its changes back. This, however, might need some changes in how themes apply their styles (change push/pop to direct assignment for the global theme).Describe alternatives you've considered
None. Well, one could handle Ctrl-Tab on their own and render the switcher using DPG... but that doesn't sound sane.
Additional context
The text was updated successfully, but these errors were encountered: