From b6f78d8d95150a0960215ee7cd4f5e67563cc11f Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sun, 8 Nov 2015 20:42:09 +0000 Subject: [PATCH] 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). --- pcsx2/gui/Panels/GameFixesPanel.cpp | 2 ++ pcsx2/gui/Panels/SpeedhacksPanel.cpp | 8 +++++--- pcsx2/gui/Panels/VideoPanel.cpp | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index f1d0e87e9b..5c82b579cf 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -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 ) diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 2975967b58..b4265eca46 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -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"); } diff --git a/pcsx2/gui/Panels/VideoPanel.cpp b/pcsx2/gui/Panels/VideoPanel.cpp index a6f6b55afd..0dc7b8545f 100644 --- a/pcsx2/gui/Panels/VideoPanel.cpp +++ b/pcsx2/gui/Panels/VideoPanel.cpp @@ -358,5 +358,7 @@ void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, int flags ) m_span->ApplyConfigToGui( configToApply, true ); m_fpan->ApplyConfigToGui( configToApply, true ); } + + Layout(); }