FreeCAD / FreeCAD/FreeCAD

UI: Selected/hovered faces in the 3D view appear tinted with face color - Chosen selection color is not the one which is visible.

Open
#10,614 22 comments 8 reactions 0 assignees View on GitHub
Help wanted Mod: Core Priority: High Topic: Color Topic: User Interface Type: Feature
Dominant language
C++
Stars
33.6k
Forks
6k
Avg merge
3d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Problem description

Currently the 3D view selection colors looks way off from the colors defined in `Preferences > General > Selection`. The colors also change depending on the angle of the viewport. This is because the selected and hovered faces are shaded just like the rest of the part. Below is an example that shows the issue:

![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/250e70e7-6fd9-47a9-80ab-1fa84f8d3c2c)
![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/99c3d6b5-c211-486b-879f-886fc503c38e)
![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/0616c95d-ff96-4ce0-b743-e44ec7b65c0c)

In both images the same face is hovered but the bottom one looks barely highlighted because of the shading and the view angle. Other CAD software solve this issue by displaying selected and hovered faces as non-shaded (or applying "less shading" to those faces). Below is an example from OnShape:

![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/0ee3d1d0-9b86-46e8-81fe-cd91ae55b985)
![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/5f5deb5b-3ec4-473a-a3b0-c03d8fbabd64)

I've done a proof of concept implementation of this in FreeCAD and can open a PR if people are in favor of this. It might also make sense to implement this as a preference but I'm not sure how to approach that. Open to discussion.

![image](https://github.com/FreeCAD/FreeCAD/assets/69015181/5bbf6522-3bce-40cb-be62-6eaf9de528e9)

### Full version info

```shell
OS: Fedora Linux 38 (KDE Plasma) (KDE/plasmax11)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.34177 (Git)
Build type: Release
Branch: master
Hash: 331b76485002084ab341cfe5b27eb492b50a9c85
Python 3.11.4, Qt 5.15.10, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:
* Assembly4.backup1691951820.225657 0.50.2
* Assembly4
* Behave-Dark-Colors 0.1.1
* Curves 0.6.13
* DynamicData 2.46.0
* fasteners 0.4.59
* Freecad-Built-in-themes-beta 1.2.2
* freecad.gears.backup1692223246.5590403 1.0.0
* freecad.gears
* ExtremeProLight 1.6.0
* A2plus 0.4.60n
* ExplodedAssembly
* Glass
* kicadStepUpMod 10.19.4
* Silk 0.1.4
* lattice2 1.0.0
* Manipulator 1.5.0
* Leaf Dark Colors 0.1.1
* FreeCAD_DarkPreferencePack 0.0.1
```

### Subproject(s) affected?

Core

### Anything else?

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.