FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.87k stars 4.06k forks source link

Classic Theme: Qt6 on Windows does not adapt appropriately #15346

Open chennes opened 4 months ago

chennes commented 4 months ago

Is there an existing issue for this?

Problem description

When compiled against Qt6 and run on Windows 11, the interaction of FreeCAD's widgets with Windows icons and fonts results in a sometimes-unusable (and always inconsistent) user interface. In particular, if Windows 11 is running in dark mode the menu text remains black, which cannot be seen against the Win11 dark mode menu background. Even in light mode, the default system icons give an inconsistent look to the interface and should not be used.

Full version info

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37953 +8 (Git)
Build type: Release
Branch:  main
Hash: c29cb8464d02469f21a53b34d8791cd6941fe722
Python 3.12.3, Qt 6.7.1, Coin 4.0.2, Vtk 9.3.0, OCC 7.8.0
Locale: English/United States (en_US)

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

maxwxyz commented 4 months ago

@chennes Do you have a screenshot and does it occur on al instances or only certain dialogs? BTW is there a chance to get a Qt6 build for Win?

LarryWoestman commented 4 months ago

I did a test build of chennes' new libpack 3 release candidate:

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38095 (Git)
Build type: Release
Branch: main
Hash: af1f7385d47b9887e758794afdc3b1f69b406b96
Python 3.12.4, Qt 6.7.2, Coin 4.0.2, Vtk 9.3.0, OCC 7.8.0
Locale: English/United States (en_US)

It appears to me that it occurs on many dialogs, but not always consistently. Sometimes the dialogs are completely dark on dark and other times the dialogs contain some light on dark entries. Three representative screen shots:

Screenshot 2024-07-10 090402 Screenshot 2024-07-10 090434 Screenshot 2024-07-10 090457

MisterMakerNL commented 4 months ago

We have set QT darkmode to 1 but this should only affect the window decoration like title bar and borders. This worked perfectly fine in QT 5, but stopped working in QT 6. https://github.com/FreeCAD/FreeCAD/blob/608cb182e516e683befa890a84ca615c040b1235/src/Main/MainGui.cpp#L161 https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5 @kadet1090

luzpaz commented 2 months ago

@kadet1090 :point_up_2:

luzpaz commented 3 weeks ago

Moved to Post 1.0 milestone where Qt6 issues will be addressed (unless someone wants to spearhead this one beforehand, please have at it)

Edit: Unassigned mistermaker due to this being more technical then just stylesheet changes. (hope that is right?)