DearPyGui
DearPyGui copied to clipboard
When docking is enabled, setting mvThemeCol_TitleBg in the code fails to take effect.
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 in ImGui.
To Reproduce
Steps to reproduce the behavior:
- merging windows, the window title background is reset to the default blue color
- Modify
mvThemeCol_TitleBgormvThemeCol_TitleBgActiveto 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
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()
A duplicate of #1751 but this one gives extra info, so keeping it open.
Also #2312 might be messing things here, too.