Changing Icon Colours
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Changing Icon Colours
I am using a 'Dark' Stylesheet in
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/New Zealand (en_NZ)
You can see what it looks like in the GUI image attached.
I use this style because I have found that glaring white (and Blue) GUIs (in the Microsoft fashion) give me screaming headaches at the end of a shift. Blame that on my fading, geriatric eyesight if you like but it is unpleasant and unnecessary. However, this solution raises another issue (You get nothing for nothing, eh!) in that the Sketcher Constraints toolbar (on the right of my GUI) is difficult to distinguish.
How can I change the icons on the Sketcher Constraints toolbar so they are similar to the icons on the Sketcher Geometries toolbar? For example, I would like the Coincident Constraint Icon to be predominantly white like the Sketcher Circle Icon .
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/New Zealand (en_NZ)
You can see what it looks like in the GUI image attached.
I use this style because I have found that glaring white (and Blue) GUIs (in the Microsoft fashion) give me screaming headaches at the end of a shift. Blame that on my fading, geriatric eyesight if you like but it is unpleasant and unnecessary. However, this solution raises another issue (You get nothing for nothing, eh!) in that the Sketcher Constraints toolbar (on the right of my GUI) is difficult to distinguish.
How can I change the icons on the Sketcher Constraints toolbar so they are similar to the icons on the Sketcher Geometries toolbar? For example, I would like the Coincident Constraint Icon to be predominantly white like the Sketcher Circle Icon .
- Attachments
-
- 210901 FreeCAD GUI.png (290.05 KiB) Viewed 2089 times
"It is much harder to simplify than to complicate."
Joseph Kimble
Joseph Kimble
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Changing Icon Colours
You probably won't like this answer because it involves a lot of work. Perhaps someone will have a better way.
One way to do this could be to create a macro to do the constraint. Perhaps just have it simulate a keystroke that invokes the macro. For example, C key does the coincident constraint. When you run the macro it presses C for you and that runs the constraint. Create a custom macro toolbar for sketcher workbench, add the macro to it, create your own toolbar icon that meets your satisfaction for the macro. I believe it is possible (but I haven't tried it) to remove the coincident constraint from the sketcher constraints toolbar. Do this for all of the constraints.
Here is a macro for the Coincident Constraint (sends a 'c' keystroke to the active window):
One way to do this could be to create a macro to do the constraint. Perhaps just have it simulate a keystroke that invokes the macro. For example, C key does the coincident constraint. When you run the macro it presses C for you and that runs the constraint. Create a custom macro toolbar for sketcher workbench, add the macro to it, create your own toolbar icon that meets your satisfaction for the macro. I believe it is possible (but I haven't tried it) to remove the coincident constraint from the sketcher constraints toolbar. Do this for all of the constraints.
Here is a macro for the Coincident Constraint (sends a 'c' keystroke to the active window):
Re: Changing Icon Colours
Thanks for the idea.
That would mean that I could apply the constraints without having to distinguish the icons on the Sketcher Constraints toolbar. Yes.
I am not scared of the work involved in writing 19 macros. No.
However, if I can I think I would prefer a different set of Icons.
That would mean that I could apply the constraints without having to distinguish the icons on the Sketcher Constraints toolbar. Yes.
I am not scared of the work involved in writing 19 macros. No.
However, if I can I think I would prefer a different set of Icons.
"It is much harder to simplify than to complicate."
Joseph Kimble
Joseph Kimble
Re: Changing Icon Colours
There are other icon sets around, did you try one of these?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Changing Icon Colours
I expected to be able to find a folder of icon images somewhere in the FC Installation. There is no such and Uncle Google knows nothing about such a folder. If there was one I would have had a go at modifying the icons locally and, if successful, would not have started this thread in the first place.
There are 'Icon Themes' at https://github.com/triplus/IconThemes#v ... ecommended but I find the information there a bit circular. I am told 'This module can be installed via the FreeCAD Addon Manager. In FreeCAD, Open Tools > Addon Manager and search for "IconThemes" in the list.' I go there and install 'Icon Themes;
I now have 'Accessories --> Icon Themes' but that doesn't get me very far.
Is it these 'Icon Themes' you are talking about when you say 'Icon Sets'?
If so, how do I see them, select one, install one, etc.?
If not, where are these 'Icon Sets'?
"It is much harder to simplify than to complicate."
Joseph Kimble
Joseph Kimble
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Changing Icon Colours
If you need the shift key use, for example:Vagulus wrote: ↑Wed Sep 01, 2021 5:58 am Thanks for the idea.
That would mean that I could apply the constraints without having to distinguish the icons on the Sketcher Constraints toolbar. Yes.
I am not scared of the work involved in writing 19 macros. No.
However, if I can I think I would prefer a different set of Icons.
Code: Select all
sendkeys(ord('H'),QtCore.Qt.ShiftModifier) #Shift + H
control key:
QtCore.Qt.ControlModifier
alt key:
QtCore.Qt.AltModifier
You can also create easier-to-type aliases:
Code: Select all
shift = QtCore.Qt.ShiftModifier
ctrl = QtCore.Qt.ControlModifier
alt = QtCore.Qt.AltModifier
ctrl_shift = QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier
sendkeys('h', shift) # to send shift+h
sendkeys('c') # to send c
sendkeys('k',ctrl) # to send control + k
sendkeys('x',ctrl_shift) # to send ctrl + shift + x
I wish we could embed macro toolbar icons into the macro in XPM format.
You can find the sketcher icons here:
https://github.com/FreeCAD/FreeCAD/tree ... rces/icons
Most, if not all, workbenches have their icons organized the same way -- inside the Gui/Resources folder in the source code.
Re: Changing Icon Colours
Thanks for that. Now I know where to find the SVG files although I have yet to find a way to edit them.
Even if I have a suitably edited set, how would I get them to display in my GUI?
Even if I have a suitably edited set, how would I get them to display in my GUI?
"It is much harder to simplify than to complicate."
Joseph Kimble
Joseph Kimble
Re: Changing Icon Colours
[quote=Vagulus post_id=529796 time=1630548837 user_id=35139
I now have 'Accessories --> Icon Themes'
[/quote]
I forgot to point out that the Icon Themes image I showed is just that - an image in my GUI. It does not react in any way.
I now have 'Accessories --> Icon Themes'
[/quote]
I forgot to point out that the Icon Themes image I showed is just that - an image in my GUI. It does not react in any way.
"It is much harder to simplify than to complicate."
Joseph Kimble
Joseph Kimble
Re: Changing Icon Colours
Did you read the Readme at github?
https://github.com/triplus/IconThemes#via-addon-manager-recommended wrote: For the demonstration purposes demo.rcc icon theme was provided.
Move the demo.rcc to the appropriate location:
On Linux: /home/user_name/.FreeCAD/Gui/Icons/demo.rcc
On MacOS: /Users/user_name/Library/Preferences/FreeCAD/Gui/Icons/demo.rcc
On Windows: C:\Users\user_name\AppData\Roaming\FreeCAD\Gui\Icons\demo.rcc
Note: The folder might not exist, but you can create them manually
You can then open the icon themes preferences in FreeCAD (Accessories > IconThemes) and choose the icon theme.
Re: Changing Icon Colours
I had meant indeed "Icon Themes". However, I have never installed one myself. From what I see what you installed from the AddonManager was only the framework. In the Usage section of this addon it is explained how to add an icon theme then.
Edit: Fast Bance was, well, faster.
Edit: Fast Bance was, well, faster.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.