gui:windows: Fix pxStaticText colours in Emulation Settings

The window is redrawn when Layout() is used (I think), so the text is
repainted with the correct colour.

This fixes the gray/ungray behaviour in the Emulation Settings dialog.
(Specifically, it affected the GS, Speedhacks, and Game Fixes Panel).
This commit is contained in:
Jonathan Li 2015-11-08 20:42:09 +00:00
parent 9bb990e9ed
commit b6f78d8d95
3 changed files with 9 additions and 3 deletions

View File

@ -146,6 +146,8 @@ void Panels::GameFixesPanel::EnableStuff( AppConfig* configToUse )
if( !configToUse ) configToUse = g_Conf;
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
m_checkbox[i]->Enable(m_check_Enable->GetValue() && !configToUse->EnablePresets);
Layout();
}
void Panels::GameFixesPanel::OnEnable_Toggled( wxCommandEvent& evt )

View File

@ -265,6 +265,11 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse )
m_check_fastCDVD->Enable(HacksEnabledAndNoPreset);
m_check_vuThread->Enable(hacksEnabled); // MTVU is unaffected by presets
// Layout necessary to ensure changed slider text gets re-aligned properly
// and to properly gray/ungray pxStaticText stuff (I suspect it causes a
// paint event to be sent on Windows)
Layout();
}
void Panels::SpeedHacksPanel::AppStatusEvent_OnSettingsApplied()
@ -296,9 +301,6 @@ void Panels::SpeedHacksPanel::ApplyConfigToGui( AppConfig& configToApply, int fl
// Then, lock(gray out)/unlock the widgets as necessary.
EnableStuff( &configToApply );
// Layout necessary to ensure changed slider text gets re-aligned properly
Layout();
//Console.WriteLn("SpeedHacksPanel::ApplyConfigToGui: EnabledPresets: %s", configToApply.EnablePresets?"true":"false");
}

View File

@ -358,5 +358,7 @@ void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, int flags )
m_span->ApplyConfigToGui( configToApply, true );
m_fpan->ApplyConfigToGui( configToApply, true );
}
Layout();
}