IconThemes
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: IconThemes
Will test on Manjaro Linux in the following days.
P.S. That visual glitch is unrelated (Py3/Qt5). I am aware of it and it will get fixed at some point in the future.
P.S. That visual glitch is unrelated (Py3/Qt5). I am aware of it and it will get fixed at some point in the future.
Re: IconThemes
Hi @Kunda1
A had some spare time and decided to make a quick test now. Based on your provided data i used the same setup. Manjaro Linux XFCE Edition and latest FreeCAD 0.19 AppImage. The instructions worked on my side, without any issues detected:
https://forum.freecadweb.org/viewtopic. ... 60#p338771
A had some spare time and decided to make a quick test now. Based on your provided data i used the same setup. Manjaro Linux XFCE Edition and latest FreeCAD 0.19 AppImage. The instructions worked on my side, without any issues detected:
https://forum.freecadweb.org/viewtopic. ... 60#p338771
Re: IconThemes
Hi @triplus, so I figured out what the problem was. I used wget to pull the .rcc file from github and pulled the .html page instead of the raw file.triplus wrote: ↑Sun Oct 06, 2019 7:34 pm A had some spare time and decided to make a quick test now. Based on your provided data i used the same setup. Manjaro Linux XFCE Edition and latest FreeCAD 0.19 AppImage. The instructions worked on my side, without any issues detected:
https://forum.freecadweb.org/viewtopic. ... 60#p338771
The icons work, but I still see the python syntax in the dialog like so (I tried to look at the code and debug where this is getting added: Not sure but it may be happening in the code somewhere in https://github.com/triplus/IconThemes/b ... py#L54-L82
or
https://github.com/triplus/IconThemes/b ... #L114-L120
Anyway, is there any way that you can get the .rcc file from https://github.com/formjune/1D_SVG_Tool ... Icon%20Set in to the IconTheme repo ? maybe as a submodule ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: IconThemes
Based on started discussion and based on my past involvement and experience, working in this area, here is the plan, regarding maturing FreeCAD icon themes support, and finishing the planned work from my side:
1.) An icon themes oriented repository, named FreeCAD-icons (https://github.com/FreeCAD), paired with Travis CI.
2.) Support, for installing icon theme packs, from the above repository, will be added to the addons manager
3.) Code and upstream accessories menu module
4.) Prepare and upstream icon themes module
5.) Further progress icon themes support in FreeCAD
6.) Documentation
1.) An icon themes oriented repository, named FreeCAD-icons (https://github.com/FreeCAD), paired with Travis CI.
2.) Support, for installing icon theme packs, from the above repository, will be added to the addons manager
3.) Code and upstream accessories menu module
4.) Prepare and upstream icon themes module
5.) Further progress icon themes support in FreeCAD
6.) Documentation
Re: IconThemes
Hey triplus,
that's awesome work!
I found your instructions on how to compile the rcc files and how to structure them:
https://forum.freecadweb.org/viewtopic. ... 01#p292101
What I haven't really understood yet is how to name the individual icons:
I saw that e.g. one file is called "Std_ViewAxo.svg" with I guess refers to "Std_ViewAxo" in the code.
But I haven't found anything in the code or the repo where the naming comes from (I was expecting some kind of lookup table or some naming scheme).
Could you help me out? (I'd love to try the icons I am working on inside the application)
that's awesome work!
I found your instructions on how to compile the rcc files and how to structure them:
https://forum.freecadweb.org/viewtopic. ... 01#p292101
What I haven't really understood yet is how to name the individual icons:
I saw that e.g. one file is called "Std_ViewAxo.svg" with I guess refers to "Std_ViewAxo" in the code.
But I haven't found anything in the code or the repo where the naming comes from (I was expecting some kind of lookup table or some naming scheme).
Could you help me out? (I'd love to try the icons I am working on inside the application)
Re: IconThemes
Hi @st_phan
Yes, that is basically the idea of the above 6 points. You, as a designer, should be able to look in a repository, such as FreeCAD-icons, containing a few well maintained FreeCAD icon themes, read a bit of documentation, and after being able to achieve that for yourself in a rather effortless way.
For now, the easiest way to get the icon names is to look in the FreeCAD source for .svg files. I would recommend for you to clone or download the source code:
https://github.com/FreeCAD/FreeCAD
And search for .svg files in for example a file manager. There are a few specifics, like some icon files need to be added to a sub-folder. But don't worry about that for now.
Yes, that is basically the idea of the above 6 points. You, as a designer, should be able to look in a repository, such as FreeCAD-icons, containing a few well maintained FreeCAD icon themes, read a bit of documentation, and after being able to achieve that for yourself in a rather effortless way.
First thing you need to do is to successfully complete the compiling tutorial. Have you managed to do that? If yes, now you need to add more icon files to the Demo folder and a corresponding file name lines to demo.qrc file.
Code: Select all
<file>new-file.svg</file>
https://github.com/FreeCAD/FreeCAD
And search for .svg files in for example a file manager. There are a few specifics, like some icon files need to be added to a sub-folder. But don't worry about that for now.
Re: IconThemes
That sounds like a great plantriplus wrote: ↑Sat May 23, 2020 4:03 pm Yes, that is basically the idea of the above 6 points. You, as a designer, should be able to look in a repository, such as FreeCAD-icons, containing a few well maintained FreeCAD icon themes, read a bit of documentation, and after being able to achieve that for yourself in a rather effortless way.
I have done a fair bit of programming in my past, but I know many designers out there have never touched git, programming or the commandline ...
—
It took me quite some time to find out how to get the rcc binary (QT's documentation was not really helpful on that),
but once that was done and a few wrong exports later:
Only a few icons for testing, but still a success!
It's really cool to have your theme manager for this kind of work
Do you mind if I send a PR your way regarding some adjustments to the readme in your repo?
I noted some things down (especially the things you mentioned in this thread and some struggles I had now) and it would be cool to have those infos in the repo.
Re: IconThemes
It makes testing icons and swapping them out really fast
Re: IconThemes
Wow, it even works with the icons for the workbenches! Reaaaalllyyyyy nice
Sorry for spamming this thread, but I am really excited how well it works
FYI:
I also wrote a short script in NodeJS, so I don't have to write the .qrc file manually:
Sorry for spamming this thread, but I am really excited how well it works
FYI:
I also wrote a short script in NodeJS, so I don't have to write the .qrc file manually:
Code: Select all
const fs = require('fs');
const path = require('path')
const selectedPath = './';
const themeFileName = '_index.theme';
const exportFileName = '_contents.qrc';
let content = '';
content += '<!DOCTYPE RCC><RCC version="1.0">\n'
content += ' <qresource prefix="/icons/Demo">\n'
content += ' <file>' + themeFileName + '</file>\n'
content += ' </qresource>\n'
content += ' <qresource prefix="/icons/Demo/scalable">\n'
fs.readdir(selectedPath, (err, files) => {
files.forEach(file => {
const extension = path.extname(file);
if (extension === '.svg') {
content += ' <file>' + file + '</file>\n'
}
});
content += ' </qresource>\n'
content += '</RCC>\n'
console.log(content);
fs.writeFileSync(exportFileName, content);
});
Re: IconThemes
Hi @st_phan
Good to see you figured it out. As for the documentation. It would be really great if you would help out with that. ATM i am not sure, on where it makes the most sense, to start writing it. Therefore just use whatever suits you the most. Ultimately i guess FreeCAD Wiki and/or FreeCAD icon themes repository will hold such documentation. Note that i have just created the FreeCAD icon themes repository:
https://github.com/FreeCAD/FreeCAD-icons
You can go ahead and add a couple of icons with a PR. Basically i need some icons, to sort out the Travis CI side of things.
Good to see you figured it out. As for the documentation. It would be really great if you would help out with that. ATM i am not sure, on where it makes the most sense, to start writing it. Therefore just use whatever suits you the most. Ultimately i guess FreeCAD Wiki and/or FreeCAD icon themes repository will hold such documentation. Note that i have just created the FreeCAD icon themes repository:
https://github.com/FreeCAD/FreeCAD-icons
You can go ahead and add a couple of icons with a PR. Basically i need some icons, to sort out the Travis CI side of things.
pablogil wrote:
If desired on your side a pull request for Simple and COIL icon themes would be great. Basically each icon theme (variant) should have icons in a separate folder, i can sort out the rest.1D_Inc wrote: