Open pedromorgan opened 1 year ago
Hi @pedromorgan ! At least from the Spyder side what we do is that we use QtAwesome through some utility functions that helps us either load a custom iconic font or use the ones bundled with QtAwesome. There we also have a mapping to name a specific set ofarguments for how an icon should look (identifier, color, scale, positioning, etc). For more info you can check https://github.com/spyder-ide/spyder/blob/518f8d1c663735d296d1eb784aa503df1654ea9d/spyder/utils/icon_manager.py and more specifically https://github.com/spyder-ide/spyder/blob/518f8d1c663735d296d1eb784aa503df1654ea9d/spyder/utils/icon_manager.py#L106 and https://github.com/spyder-ide/spyder/blob/518f8d1c663735d296d1eb784aa503df1654ea9d/spyder/utils/icon_manager.py#L340
Let us know if the info above helps!
@dalthviz I used to do the same for years - using some utility functions - but it doesn't scale for me anymore. Don't you experience similar problems in Spyder as the application grows? I already have hundreds of icons with different colors and parameters in my application, and I feel like I'll soon need my own separate GUI just for managing my icons (and colors).
It does sound a bit ridiculous, I must admit :) having a separate GUI for icons only but here's the thing: sometimes I need to refer to the icon (QIcon), sometimes to the icon alias (str), sometimes to its color, while sometimes to the same icon but with different color themes (using my general application theme, for instance). I seldom even need to refer to the same icon but with different options, e.g. different scaling. Plus, I haven't even bothered with dark mode yet...
So what I'll probably implement for myself is a simple Qt GUI where:
Anyway, I just wanted to share. The more I think about it, the more I realize I need this for my project. If you're interested in this, let me know. I could ping you once it's done.
Hi @zkovari thank you for sharing your ideas! And although for the moment I think we have been able to handle things with the icon_manager
module mentioned + QtAwesome (as well as other packages to style things like QDarkStyle and QStylizer), is true that when you start to think about it there are quite a good amount of things involved for the icon handling 🤔
Also, pinging @ccordoba12 maybe he could have some perspective/ideas about this
assume its
.py
A Cat can be skinned in many ways..