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

[Feature Request]: Change Pin Icon #152

Open
christian-byrne opened this issue Sep 17, 2024 · 0 comments
Open

[Feature Request]: Change Pin Icon #152

christian-byrne opened this issue Sep 17, 2024 · 0 comments

Comments

@christian-byrne
Copy link

Ref

Possible Implementation

The PrimeIcons font is already loaded with icons mapped to unicode sequences:

              ctx.textAlign = "left";
              ctx.fillText(
                title,
                title_height,
                LiteGraph.NODE_TITLE_TEXT_Y - title_height
              );
              if (node22.pinned) {
                ctx.font = `${this.title_text_font.split(" ")[0]} PrimeIcons`
                ctx.fillText(
                  "\uea25",
                  title_height + ctx.measureText(title).width + 8,
                  LiteGraph.NODE_TITLE_TEXT_Y - title_height
                )
              }

Comparison

Selection_312

Selection_313

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

No branches or pull requests

1 participant