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
I prepared a PR to be included in FreeCAD 0.18.
https://github.com/FreeCAD/FreeCAD/pull/1967
I went over the workbenches and enabled missing icon themes support for commands on toolbars, not including Draft Snap toolbar for now, and for Constraints and Elements sections in Sketcher Tasks panel. This should make FreeCAD 0.18 rather (end user) usable, when it comes to the next version of IconThemes module for FreeCAD. Pursuing good icon themes support in other areas will happen in FreeCAD 0.19 development cycle.
https://github.com/FreeCAD/FreeCAD/pull/1967
I went over the workbenches and enabled missing icon themes support for commands on toolbars, not including Draft Snap toolbar for now, and for Constraints and Elements sections in Sketcher Tasks panel. This should make FreeCAD 0.18 rather (end user) usable, when it comes to the next version of IconThemes module for FreeCAD. Pursuing good icon themes support in other areas will happen in FreeCAD 0.19 development cycle.
Re: IconThemes
Great! Yeah, ultimately all icons need to become themable. I think we still need a python version of that bitmapfactory function that checks for theme icons?
Re: IconThemes
Not sure about that, using the standard approach should likely do:
I added support for Draft Snap and Tray toolbars in such way:
https://github.com/FreeCAD/FreeCAD/pull/1977
Basically with this PR icon theme can now be applied for all commands located on toolbars in FreeCAD 0.18.
On my local branch indeed there are still some QIcons left, viewprovider icons, some Tasks panel related icons, macro dialog related ones ... Some of this areas will require small code adjustments. Therefore if FreeCAD 0.18 release is imminent, i guess best to target all that for FreeCAD 0.19.Yeah, ultimately all icons need to become themable.
P.S. And yeah, now some icons from Simple icon theme are missing.
Re: IconThemes
Ingredients of a typical FreeCAD icon pack (all files located in a single folder):
The contents of a .qrc file:
Resource compiler (rcc tool) is used to create an external binary resource data file, for use as a dynamic resource. On Linux:
If newer version of rcc tool is used and to preserve support for Qt4 and older Qt5 versions (likely versions below Qt 5.9). Use the --format-version option:
P.S. For testing purposes i temporarily modified IconThemes module in a way it will look for Gui/Icons/demo.rcc file inside user application data folder. On Linux that would be ./FreeCAD/Gui/Icons folder (other platforms). On FreeCAD start, whenever the file is detected, the data will get registered and an icon pack named Demo will get set. Useful for testing the Coil icon pack:
https://forum.freecadweb.org/viewtopic.php?f=34&t=34687
P.S. Feedback on how it works cross platforms is appreciated.
- Icons preferably in the SVG format (view-top.svg)
- index.theme file
- .qrc file
Code: Select all
[Icon Theme]
Name=Demo
Comment=Demo icon theme pack
Inherits=FreeCAD-default
Directories=scalable
[scalable]
Size=64
Type=Scalable
MinSize=1
MaxSize=256
Code: Select all
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/icons/Demo">
<file>index.theme</file>
</qresource>
<qresource prefix="/icons/Demo/scalable">
<file>view-top.svg</file>
</qresource>
</RCC>
Code: Select all
/usr/bin/rcc --binary demo.qrc -o demo.rcc
Code: Select all
/usr/bin/rcc --binary demo.qrc -o demo.rcc --format-version 1
https://forum.freecadweb.org/viewtopic.php?f=34&t=34687
P.S. Feedback on how it works cross platforms is appreciated.
Last edited by triplus on Mon May 06, 2019 9:40 pm, edited 3 times in total.
Re: IconThemes
Demo.
Re: IconThemes
For testing purposes i attached a demo icon theme pack containing one icon (view top). Rename the file from demo.zip to demo.rcc, attached file is not a ZIP file.
- Attachments
-
- demo.zip
- (464 Bytes) Downloaded 135 times
Re: IconThemes
icon themes module for FreeCAD is available. It supports icon packs provided from internal/external binary resource files. For now, until existing icon packs migrate, i left the previous icon themes functionality intact (Accessories -> Icon themes legacy).
New release of Re: IconThemes
First, please don't double post, and second i will need a bit more info. On what platform did the issue occur and i will assume it occurred, after you have enabled the Demo theme? If you start FreeCAD from the terminal or CMD. Any additional clues and errors provided? Does removing the demo.rcc file from the Gui/Icons folder resolve the issue?
P.S. Note that you can always manually install or remove the IconThemes module.
P.S. Note that you can always manually install or remove the IconThemes module.