hoffstadt / hoffstadt/DearPyGui
When docking is enabled, setting mvThemeCol_TitleBg in the code fails to take effect.
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## 2.0.2 of Dear PyGui
Version: 2.0.0
Operating System: Windows11
## When docking is enabled, setting `mvThemeCol_TitleBg` in the code fails to take effect
When docking is enabled, merging windows causes the window title background to reset to the default blue color. Even if other colors are configured via `mvThemeCol_TitleBg` or `mvThemeCol_TitleBgActive` , the title background color can be normally set through the style editor.
The related issue has been resolved by [#2700](https://github.com/ocornut/imgui/issues/2700) in ImGui.
## To Reproduce
Steps to reproduce the behavior:
1. merging windows, the window title background is reset to the default blue color
2. Modify `mvThemeCol_TitleBg` or `mvThemeCol_TitleBgActive` to set the window title
background color
## Expected behavior
After merging windows, the window title can correctly use the colors of `mvThemeCol_TitleBg` and `mvThemeCol_TitleBgActive`.
## Screenshots/Video

## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.configure_app(docking=True, docking_space=True)
dpg.create_viewport(title="Custom Title", width=900, height=600)
with dpg.theme() as global_theme:
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_color(dpg.mvThemeCol_TitleBg, (255, 0, 0, 255))
dpg.add_theme_color(dpg.mvThemeCol_TitleBgActive, (0, 255, 0, 255))
dpg.bind_theme(global_theme)
with dpg.window(label="Window 1", width=300, height=200):
dpg.add_text("window 1")
with dpg.window(label="Window 2", width=300, height=200):
dpg.add_text("window 2")
dpg.show_style_editor()
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
Contributor guide
Assessment
This issue has not been assessed yet.