cmake-gui: Fix first-configure dialog appearance in Dark Mode on Windows

Since commit 1fef953655 (Utilities/Release: Update to Qt 6.10.1 on
Windows builds, 2025-12-08) our official binaries on Windows now honor
dark mode.  However, this dialog became unreadable, seemingly due to
QTBUG-123853.  Setting the wizard style to itself seems to work around
the problem.

Fixes: #27587
Qt-Issue: https://qt-project.atlassian.net/browse/QTBUG-123853
Suggested-by: Matthew Woehlke <matthew.woehlke@kitware.com>
This commit is contained in:
Brad King
2026-02-18 14:25:25 -05:00
parent 4966f3ed98
commit 4f451d044a
+4
View File
@@ -477,6 +477,10 @@ void ToolchainCompilerSetup::setToolchainFile(QString const& t)
FirstConfigure::FirstConfigure()
{
#ifdef _WIN32
// FIXME(QTBUG-123853): Fix window style init for dark mode.
this->setWizardStyle(this->wizardStyle());
#endif
char const* env_generator = std::getenv("CMAKE_GENERATOR");
char const* env_generator_platform = nullptr;
char const* env_generator_toolset = nullptr;