DearPyGui
DearPyGui copied to clipboard
TitleBgActive and DockingEmptyBg not binding.
Version of Dear PyGui
Version: 1.5.1 & 1.6.1 Operating System: Windows 10, Ubuntu 22.04
My Issue/Question
TitleBgActive does not bind color to docked windows. When window is not docked, the color does apply as set in the theme settings, but when window is docked to a viewport or other window the color changes back to the default color.
DockingEmptyBg does not change color. It keeps the default dark grey color.
Changing TitleBgActive or DockingEmptyBg with style editor does work, but not when I bind the colors to the theme.
To Reproduce
Steps to reproduce the behavior:
- Run the example code below.
- For TitleBgActive dock a window to a viewport or other window.
- For DockingEmptyBg color does not change.
Expected behavior
TitleBgActive apply color to docked windows. DockingEmptyBg change background color.
Standalone, minimal, complete and verifiable example
import dearpygui.dearpygui as dpg
dpg.create_context()
with dpg.theme() as theme:
with dpg.theme_component(dpg.mvAll):
# Works if a window is not docked, when window is docked goes back to the default color.
dpg.add_theme_color(dpg.mvThemeCol_TitleBgActive, (255, 199, 46), category=dpg.mvThemeCat_Core)
# Not changing color.
dpg.add_theme_color(dpg.mvThemeCol_DockingEmptyBg, (255, 199, 46), category=dpg.mvThemeCat_Core)
# Works fine:
dpg.add_theme_color(dpg.mvThemeCol_DockingPreview, (255, 199, 46), category=dpg.mvThemeCat_Core)
dpg.add_theme_color(dpg.mvThemeCol_TabActive, (0, 232, 35), category=dpg.mvThemeCat_Core)
dpg.add_theme_color(dpg.mvThemeCol_TabUnfocusedActive, (0, 97, 15), category=dpg.mvThemeCat_Core)
dpg.create_viewport(title='Test', width=800, height=800)
with dpg.window(label="Window 1", width=200, height=200):
dpg.add_text("Window 1")
with dpg.window(label="Window 2", width=200, height=200):
dpg.add_text("Window 2")
with dpg.window(label="Window 3", width=200, height=200):
dpg.add_text("Window 3")
# Changing TitleBgActive or DockingEmptyBg with style editor works, but not when I bind the theme.
dpg.show_style_editor()
dpg.configure_app(docking=True, docking_space=True)
dpg.bind_theme(theme)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
Confirmed. Looking into it.
Just re-affirm that v1.6.2 has this bug, too
@hoffstadt Is this problem caused by some docking theme propagation? It seems other title theme colors work fine.
Version 1.7.0 has this bug too
Version 1.10.0 still has the same bug