Closed Den4ina closed 7 months ago
How do you use your ne_white_theme
then?
Do you bind it directly to the node editor?
Do you bind it directly to the node editor?
I've tried:
dpg.bind_theme(ne_white_theme)
And also:
dpg.bind_item_theme(my_node_editor, ne_white_theme)
That's interesting. The first line (bind_theme
) should have worked.
Try to bind it to the parent widget of the node editor.
Hmm... no, scratch that. It doesn't work.
Okay, here's what you're missing: category=dpg.mvThemeCat_Nodes
.
dpg.add_theme_color(dpg.mvNodeCol_GridBackground, (255, 255, 255), category=dpg.mvThemeCat_Nodes)
With that, it will work in bind_theme
, and will also work if you do bind_item_theme
on the parent of the node editor. It will not work on the node editor itself, because for some reason node editor ignores the theme bound to it.
I think this ticket can be kept open so that somebody can add theme support to node editor itself. Or developers will close it if needed.
Okay, here's what you're missing:
category=dpg.mvThemeCat_Nodes
.dpg.add_theme_color(dpg.mvNodeCol_GridBackground, (255, 255, 255), category=dpg.mvThemeCat_Nodes)
With that, it will work in
bind_theme
, and will also work if you dobind_item_theme
on the parent of the node editor. It will not work on the node editor itself, because for some reason node editor ignores the theme bound to it.
Oh, it really worked for me. You need to understand how these categories work... for some reason, it's hard for me to understand this. Thank you very much! It really helped in my case.
Hello, dear developers. I'm trying to make a light theme for my app. I managed to change the colors for all the elements except the node editor. I am using this code to change the background of the node editor:
However, it doesn't work for me. I can change the color of text, windows, buttons and everything else, but the background of the node editor does not change.
When using the built-in style editing window, everything works and the color changes. However, I can't make it out of the code. Please help me figure out what I'm doing wrong