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

PushStyleVar(ImNodesStyleVar_LinkThickness, ...) doesn't work. #153

Open
simonwinkelbach opened this issue May 24, 2022 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@simonwinkelbach
Copy link

I want to increase the line thickness of individual links, while keeping the default thickness of all others.

PushStyleVar(ImNodesStyleVar_LinkThickness, 5);
Link(...);
PopStyleVar();

doesn't change the thickness, whereas

PushColorStyle(ImNodesCol_Link, IM_COL32(255, 255, 255, 255));
Link(...);
PopColorStyle();

changes the color as expected.

Great project BTW. Very clean and easy to use.
Thanks!!

@maratcho
Copy link

Make sure you call the PushStyleVar before ImNodes::BeginNodeEditor();

@simonwinkelbach
Copy link
Author

simonwinkelbach commented May 26, 2022

Make sure you call the PushStyleVar before ImNodes::BeginNodeEditor();

Thanks for the hint.
This changes the thickness of all links, but as I said, I want to change thickness of just some links and not all. In our application, some nodes perform long-running tasks, therefore their output attributes are invalid at start and gets valid after a while. The idea is to emphasize links that have “valid” data by increasing their thickness.

@Nelarius Nelarius added the enhancement New feature or request label May 31, 2022
@Nelarius
Copy link
Owner

Hi @simonwinkelbach ! Indeed, it looks like we only capture the active color settings for each link, not the thickness. I just opened a massive pr which touches links, and I think this issue will be easy to fix after that is merged 🙂

@simonwinkelbach
Copy link
Author

@Nelarius Sounds great! Thanks for your support!

simonwinkelbach pushed a commit to simonwinkelbach/imnodes that referenced this issue Dec 7, 2022
…r(ImNodesStyleVar_LinkThickness, ...). This is a fix for Nelarius#153 .
@simonwinkelbach
Copy link
Author

I couldn't wait to fix this issue by myself, which wasn't a big deal.
Here is the pull request: #172

@simonwinkelbach
Copy link
Author

@Nelarius is this project still alive? Would be a shame if not! I volunteer to help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants