Skip to content

Commit

Permalink
x Windows GUI dark mode: avoid an unexpected popup
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMartinez committed May 31, 2024
1 parent 301f44e commit e06dd9a
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 e06dd9a

Please sign in to comment.