ni / labview-icon-editor

Source for LabVIEW's icon editor
MIT License
15 stars 11 forks source link

Add INI token to ignore 'valid library icon' check when creating Text Icon #25

Open dnattinger opened 3 months ago

dnattinger commented 3 months ago

This feedback comes from Hunter Smith at JKI.

The Ctrl-Space, Ctrl-K shortcut in Quick Drop has become very popular among users wanting to assign text-based icons to their VIs.

This plugin currently has some pretty strict requirements on what it thinks is a "good" library banner that can support a VI having a text-based icon.

Some users (Hunter being the most vocal) would prefer to disable this requirement and be able to set a text-based icon on any library VI, regardless of what its banner looks like.

I've attached a screenshot of a "fix" for this issue to this Bug. It just involves updating this VI:

vi.lib\LabVIEW Icon API\Set Text Icon\Qualify Library Icon Core.vi

Check an INI token (NI.LV.TextIcon.SkipLibraryIconValidityCheck=True), and if it's present, ignore the library banner icon validity check.

icon bug fix

JayKayAce commented 3 months ago

Hey @dnattinger I have some questions to this.

dnattinger commented 3 months ago

@JayKayAce I don't quite understand your first question. My change is simply adding an INI token that advanced users like Hunter can employ to disable any library icon banner validity checking when assigning a text-based icon to a VI. I'm not changing the default behavior of anything with this change. And the debugging indicators on this VI have nothing to do with my change. The two red boxes show my only edits... adding the INI token read, and ORing it with the library icon banner validity check flag.

For your second question, I'm not aware of any existing test vectors that would be affected, as my change does not change default behavior, and is only activated with the (new) INI token that I'm proposing adding. For testing with the INI token, here's Hunter's canonical "no border" library icon banner that, without my change, doesn't allow Ctrl-K, but with my change (and the INI token), Ctrl-K works fine. HUNTER_ICON