Skip to content

Commit

Permalink
Merge pull request #852 from JeromeMartinez/DarkMode_fix
Browse files Browse the repository at this point in the history
Windows GUI dark mode: avoid an unexpected popup 2
  • Loading branch information
JeromeMartinez authored May 31, 2024
2 parents 38fdc33 + e06dd9a commit 56efc1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/GUI/VCL/GUI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,8 @@ void __fastcall TMainF::ApplicationEvents1OnSettingChange(
TObject* Sender, int Flag, const UnicodeString Section, int &Result)
{
if (Section == "ImmersiveColorSet") {
if (WindowsDarkModeEnabled()) {
M_View_EasyClick(NULL); // This is for avoiding a popup "Cannot focus a disabled or invisible window when another view is selected. TODO: better handle of this issue
if (WindowsDarkModeEnabled()) {
TStyleManager::TrySetStyle(DARK_MODE_STYLE, false);
M_Options_Darkmode->Checked = true;
} else {
Expand Down

0 comments on commit 56efc1a

Please sign in to comment.