hoffstadt / hoffstadt/DearPyGui

TitleBgActive and DockingEmptyBg not binding.

Open
#1,751 7 comments 2 reactions 0 assignees View on GitHub
priority: high type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## 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

```python
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()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.