Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Default Color of Link #258

Open
dgm3333 opened this issue Sep 23, 2023 · 1 comment
Open

Change Default Color of Link #258

dgm3333 opened this issue Sep 23, 2023 · 1 comment

Comments

@dgm3333
Copy link

dgm3333 commented Sep 23, 2023

Is there any way to change the default link color?

I have a light color scheme and the white links don't show. Currently I seem to have to set Bg to blue just so they can be seen...
(ignore the other colors I was tinkering with the style)

    Colors[StyleColor_Bg]                   = ImVec4(CF_blue, 0.2f);             
    Colors[StyleColor_Grid]                 = ImVec4(CF_gray47, 0.15f);          
    Colors[StyleColor_NodeBg]               = ImVec4(CF_whitesmoke, 0.78f);      
    Colors[StyleColor_NodeBorder]           = ImVec4(CF_lightskyblue1, 0.37f);   
    Colors[StyleColor_HovNodeBorder]        = ImVec4(CF_dodgerblue, 1.00f);      
                                                                                 
    Colors[StyleColor_SelNodeBorder]        = ImVec4(CF_dodgerblue3, 0.00f);     
    Colors[StyleColor_NodeSelRect]          = ImVec4(CF_darkorange1, 0.74f);     
    Colors[StyleColor_NodeSelRectBorder]    = ImVec4(CF_darkorange1, 0.49f);     
    Colors[StyleColor_HovLinkBorder]        = ImVec4(CF_darkorange3, 0.00f);     
    Colors[StyleColor_SelLinkBorder]        = ImVec4(CF_dodgerblue3, 0.00f);     
    Colors[StyleColor_LinkSelRect]          = ImVec4(CF_darkorange1, 0.74f);     
    Colors[StyleColor_LinkSelRectBorder]    = ImVec4(CF_darkorange1, 0.49f);     
    Colors[StyleColor_PinRect]              = ImVec4(CF_orangered3, 0.60f);      
    Colors[StyleColor_PinRectBorder]        = ImVec4(CF_orangered3, 0.49f);      
    Colors[StyleColor_Flow]                 = ImVec4(CF_dodgerblue3, 0.00f);     
    Colors[StyleColor_FlowMarker]           = ImVec4(CF_dodgerblue3, 0.00f);     
    Colors[StyleColor_GroupBg]              = ImVec4(CF_gray100, 0.37f);         
    Colors[StyleColor_GroupBorder]          = ImVec4(CF_black, 0.87f);           

image

@thedmd
Copy link
Owner

thedmd commented Sep 25, 2023

Default link color is passed as default argument to ed::Link.

https://github.com/thedmd/imgui-node-editor/blob/af7fa51bb9d68c9b44477c341f13a7dadee3e359/imgui_node_editor.h#L322C1-L322C1

This function predate styles a bit. I think I add style color for that in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants