DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

TitleBgActive and DockingEmptyBg not binding.

Open cash44 opened this issue 2 years ago • 5 comments

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:

  1. Run the example code below.
  2. For TitleBgActive dock a window to a viewport or other window.
  3. 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()

cash44 avatar May 06 '22 18:05 cash44

Confirmed. Looking into it.

hoffstadt avatar May 17 '22 12:05 hoffstadt

Just re-affirm that v1.6.2 has this bug, too

yhyu13 avatar Jul 16 '22 15:07 yhyu13

@hoffstadt Is this problem caused by some docking theme propagation? It seems other title theme colors work fine.

yhyu13 avatar Jul 16 '22 15:07 yhyu13

Version 1.7.0 has this bug too

an4ouce avatar Sep 15 '22 05:09 an4ouce

Version 1.10.0 still has the same bug

L-Nafaryus avatar Nov 08 '23 13:11 L-Nafaryus