imnodes icon indicating copy to clipboard operation
imnodes copied to clipboard

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

Open simonwinkelbach opened this issue 2 years ago • 6 comments

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

simonwinkelbach avatar May 24 '22 14:05 simonwinkelbach

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

MarcusMadland avatar May 25 '22 17:05 MarcusMadland

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.

simonwinkelbach avatar May 26 '22 05:05 simonwinkelbach

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 🙂

Nelarius avatar May 31 '22 06:05 Nelarius

@Nelarius Sounds great! Thanks for your support!

simonwinkelbach avatar Jun 02 '22 19:06 simonwinkelbach

I couldn't wait to fix this issue by myself, which wasn't a big deal. Here is the pull request: https://github.com/Nelarius/imnodes/pull/172

simonwinkelbach avatar Dec 07 '22 14:12 simonwinkelbach

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

simonwinkelbach avatar Dec 12 '22 14:12 simonwinkelbach