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

Add short contributing guide to icons in napari - making, editing, and how used #557

Open
TimMonko opened this issue Jan 28, 2025 · 3 comments
Labels
content Ideas for new or improved content

Comments

@TimMonko
Copy link
Contributor

📚 New content request

In napari/#7556, @psobolewskiPhD asks for a 'brief colophon' on how to make changes to icons, that could be added to the contribution guide. (Together with 'vitiate', I learned the word 'colophon' today; how exciting!)

I can work on this, but it may be useful to get input from someone else, too.

Icons (used on buttons, the logo, and some other frame stylings) are vector files saved in .svg format. Because icons in napari need to inherit styling for both light and dark appearance modes, there are a few quirks. To make icon edits, I used Inkscape (open source), but most original napari buttons were made in Adobe Illustrator. In napari/#7099 @melonora also made icon edits with Inkscape. Immediate notes are the need to use undefined for stroke and fill, BUT something about this is inconsistent and I will try to solve that before making the doc contribution.

Image

Outline

  1. Add new page to Contributing Guide
  2. Describe how to make icons / edit icons
  3. Explain the code how icons inherit the appearance settings
  4. Explain how icons are used in the napari code so that they appear on the GUI (this is not exactly easy to trace in IDEs)
@TimMonko TimMonko added the content Ideas for new or improved content label Jan 28, 2025
@psobolewskiPhD
Copy link
Member

Even what you've written above is already a great start!
As far as I'm concerned, it's already useful, so good enough to add as a section and then can iterate.

@TimMonko
Copy link
Contributor Author

What do you think about adding a new 'Appearance' section? This section could cover a multitude of topics including how the 'Theme' works (would be nice in tandem with How-to: Creating and testing themes), how some appearance settings work, like the font size settings (in part, that I'm working on with adding the overlay font size setting), and of course how to icons.

I found this 'Adding Icons' section in the main Contributing Guide, but it does seem a bit out of place compared to the other topics in that file. It also might not be up to date since the Qt resources don't need rebuilt (at least in a uv -e environment). @lucyleeow, could you provide any additional context to this rebuilding part? I'm not sure if you wrote it in #318, or just copied it in from a different file.

@lucyleeow
Copy link
Collaborator

@TimMonko I didn't write that, I just copied it over. I am not well versed with Qt, sorry, can't help you there BUT I can point you to some discussions around icons, in case it's useful:

napari/napari#3136 (some discussion regarding using icon fonts vs svgs)
pyapp-kit/app-model#217 - app-model now accepts svg as icons
napari/napari#4860 (comment) - in the original app-model migration issue, there was an item: "add documentation explaining how to use superqt.fonticons to declare icons (and figure out the best way for those icons to change color with the theme)" though it sounds like svg is a better UX option?

Also, love the idea of an 'Appearance' section.

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

No branches or pull requests

3 participants