[Fixed]New light icons for the Navigator Indicator for Dark themes

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

[Fixed]New light icons for the Navigator Indicator for Dark themes

Post by turn211 »

I suggest using these modified original icons that i inversed the color. Install them in FreeCAD/src/Gui/Stylesheets/images_dark-light/ so that Stylesheet creators can access them. I've attached the icons if someone wants to improve or review them

Proposed
NavigationIndicator_light_icons.png
NavigationIndicator_light_icons.png (128.64 KiB) Viewed 3019 times
Current
NavigationIndicator.png
NavigationIndicator.png (7.68 KiB) Viewed 3019 times
Attachments
NavigationIndicatorIcons.7z
(1.68 KiB) Downloaded 89 times
Last edited by turn211 on Thu Apr 01, 2021 6:42 pm, edited 1 time in total.
hyarion
Posts: 139
Joined: Fri Jun 26, 2020 6:08 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by hyarion »

The usual way of handeling this is to store both icons in the same directory and selecting which version based on type of theme (light vs dark) when loading the icon.

Do you know your way around freecad’s source code or would you like me to look into this for you? (I can do it this weekend)
User avatar
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by turn211 »

hyarion wrote: Thu Mar 25, 2021 7:47 am The usual way of handeling this is to store both icons in the same directory and selecting which version based on type of theme (light vs dark) when loading the icon.

Do you know your way around freecad’s source code or would you like me to look into this for you? (I can do it this weekend)
I only know enough to design so if you could look into it for me that would be great. Thanks.
hyarion
Posts: 139
Joined: Fri Jun 26, 2020 6:08 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by hyarion »

turn211 wrote: Thu Mar 25, 2021 4:43 pm I only know enough to design so if you could look into it for me that would be great. Thanks.
:+1:
User avatar
Meetlat
Posts: 72
Joined: Tue Oct 13, 2020 7:00 am

Re: New light icons for the Navigator Indicator for Dark themes

Post by Meetlat »

Hi hyarion, nice of you to take a look if this can be integrated with a selection between light/dark theme. Perhaps you could collaborate with https://forum.freecadweb.org/viewtopic. ... 20#p489527 ? He is already setting up a gui for quickly change the theme based on presets.

Perhaps you can take a look at how Affinity Photo does this. They give a option for a Dark and Light theme. You can than adjust the UI Gamme to finetune the color. Now in Freecad there are Dark-, Darker- and Light-style sheets. With blue, green, and orange accent colors. Or without accent color like ProDark. Perhaps freecad could have a switch between Dark, Darker and light and than a switch to select accent color?
Attachments
Affinity Photo Theme selection.JPG
Affinity Photo Theme selection.JPG (28.75 KiB) Viewed 2871 times
hyarion
Posts: 139
Joined: Fri Jun 26, 2020 6:08 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by hyarion »

turn211 wrote: Thu Mar 25, 2021 4:43 pm
hyarion wrote: Thu Mar 25, 2021 7:47 am The usual way of handeling this is to store both icons in the same directory and selecting which version based on type of theme (light vs dark) when loading the icon.

Do you know your way around freecad’s source code or would you like me to look into this for you? (I can do it this weekend)
I only know enough to design so if you could look into it for me that would be great. Thanks.

I've looked into this and I must admit that I was wrong. It is much better to let the stylesheet creator specify this instead as you suggested.
This way it is possible to use a both light and dark versions in the same theme, if needed (for instance you might want to use different colors if the button is highlighted or not).

I've created a pull request here for adding the new files and changed the old once to match the new naming (_light/_dark):
https://github.com/FreeCAD/FreeCAD/pull/4694
hyarion
Posts: 139
Joined: Fri Jun 26, 2020 6:08 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by hyarion »

Meetlat wrote: Fri Mar 26, 2021 6:53 am Hi hyarion, nice of you to take a look if this can be integrated with a selection between light/dark theme. Perhaps you could collaborate with https://forum.freecadweb.org/viewtopic. ... 20#p489527 ? He is already setting up a gui for quickly change the theme based on presets.

Perhaps you can take a look at how Affinity Photo does this. They give a option for a Dark and Light theme. You can than adjust the UI Gamme to finetune the color. Now in Freecad there are Dark-, Darker- and Light-style sheets. With blue, green, and orange accent colors. Or without accent color like ProDark. Perhaps freecad could have a switch between Dark, Darker and light and than a switch to select accent color?
I'm not sure what you're asking. Maybe I missed something but wasn't that thread about an expanding toolbar? I didn't see anything about adjusting colors.
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by adrianinsaval »

hyarion wrote: Tue Mar 30, 2021 9:20 pm I've looked into this and I must admit that I was wrong. It is much better to let the stylesheet creator specify this instead as you suggested.
This way it is possible to use a both light and dark versions in the same theme, if needed (for instance you might want to use different colors if the button is highlighted or not).

I've created a pull request here for adding the new files and changed the old once to match the new naming (_light/_dark):
https://github.com/FreeCAD/FreeCAD/pull/4694
Could you then add a parameter to override the used icon? I use a system set dark theme (I'm using KDE) so I don't think the icons will be changing for me like this.
User avatar
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by turn211 »

adrianinsaval wrote: Tue Mar 30, 2021 10:17 pm Could you then add a parameter to override the used icon? I use a system set dark theme (I'm using KDE) so I don't think the icons will be changing for me like this.
If you are using a system wide theme you are not using a stylesheet. You do not have to worry about any of this. :)
User avatar
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

Re: New light icons for the Navigator Indicator for Dark themes

Post by turn211 »

hyarion wrote: Tue Mar 30, 2021 9:20 pm
turn211 wrote: Thu Mar 25, 2021 4:43 pm
hyarion wrote: Thu Mar 25, 2021 7:47 am The usual way of handeling this is to store both icons in the same directory and selecting which version based on type of theme (light vs dark) when loading the icon.

Do you know your way around freecad’s source code or would you like me to look into this for you? (I can do it this weekend)
I only know enough to design so if you could look into it for me that would be great. Thanks.

I've looked into this and I must admit that I was wrong. It is much better to let the stylesheet creator specify this instead as you suggested.
This way it is possible to use a both light and dark versions in the same theme, if needed (for instance you might want to use different colors if the button is highlighted or not).

I've created a pull request here for adding the new files and changed the old once to match the new naming (_light/_dark):
https://github.com/FreeCAD/FreeCAD/pull/4694
Thanks! Very helpful. Great ideas. This now repairs all known Dark theme problems. Now I'll start designing a ProLight Theme. :D
Post Reply