Merge pull request #4015 from EmptyChaos/wx-misc-fixes
WX: Fix pop-under (win) / game list garbage (win) / language support (Linux)
This commit is contained in:
commit
09fd2fd8e2
|
@ -1273,7 +1273,9 @@
|
||||||
<ClCompile Include="..\..\src\msw\printwin.cpp">
|
<ClCompile Include="..\..\src\msw\printwin.cpp">
|
||||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\msw\progdlg.cpp" />
|
<ClCompile Include="..\..\src\msw\progdlg.cpp">
|
||||||
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\msw\radiobox.cpp" />
|
<ClCompile Include="..\..\src\msw\radiobox.cpp" />
|
||||||
<ClCompile Include="..\..\src\msw\radiobut.cpp" />
|
<ClCompile Include="..\..\src\msw\radiobut.cpp" />
|
||||||
<ClCompile Include="..\..\src\msw\regconf.cpp" />
|
<ClCompile Include="..\..\src\msw\regconf.cpp" />
|
||||||
|
|
|
@ -1209,7 +1209,7 @@
|
||||||
|
|
||||||
// Set to 0 to disable the use of the native progress dialog (currently only
|
// Set to 0 to disable the use of the native progress dialog (currently only
|
||||||
// available under MSW and suffering from some bugs there, hence this option).
|
// available under MSW and suffering from some bugs there, hence this option).
|
||||||
#define wxUSE_NATIVE_PROGRESSDLG 1
|
#define wxUSE_NATIVE_PROGRESSDLG 0
|
||||||
|
|
||||||
// support for startup tips (wxShowTip &c)
|
// support for startup tips (wxShowTip &c)
|
||||||
#define wxUSE_STARTUP_TIPS 1
|
#define wxUSE_STARTUP_TIPS 1
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
#include <wx/tipwin.h>
|
#include <wx/tipwin.h>
|
||||||
#include <wx/wxcrt.h>
|
#include <wx/wxcrt.h>
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#include <CommCtrl.h>
|
||||||
|
#include <wx/msw/dc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Common/CDUtils.h"
|
#include "Common/CDUtils.h"
|
||||||
#include "Common/CommonPaths.h"
|
#include "Common/CommonPaths.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
@ -1384,3 +1389,30 @@ bool CGameListCtrl::WiiCompressWarning()
|
||||||
"by removing padding data. Your disc image will still work. Continue?"),
|
"by removing padding data. Your disc image will still work. Continue?"),
|
||||||
_("Warning"), wxYES_NO) == wxYES;
|
_("Warning"), wxYES_NO) == wxYES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
// Windows draws vertical rules between columns when using UXTheme (e.g. Aero, Win10)
|
||||||
|
// This function paints over those lines which removes them.
|
||||||
|
// [The repaint background idea is ripped off from Eclipse SWT which does the same thing]
|
||||||
|
bool CGameListCtrl::MSWOnNotify(int id, WXLPARAM lparam, WXLPARAM* result)
|
||||||
|
{
|
||||||
|
NMLVCUSTOMDRAW* nmlv = reinterpret_cast<NMLVCUSTOMDRAW*>(lparam);
|
||||||
|
// Intercept the NM_CUSTOMDRAW[CDDS_PREPAINT]
|
||||||
|
// This event occurs after the background has been painted before the content of the list
|
||||||
|
// is painted. We can repaint the background to eliminate the column lines here.
|
||||||
|
if (nmlv->nmcd.hdr.hwndFrom == GetHWND() && nmlv->nmcd.hdr.code == NM_CUSTOMDRAW &&
|
||||||
|
nmlv->nmcd.dwDrawStage == CDDS_PREPAINT)
|
||||||
|
{
|
||||||
|
// The column separators have already been painted, paint over them.
|
||||||
|
wxDCTemp dc(nmlv->nmcd.hdc);
|
||||||
|
dc.SetBrush(GetBackgroundColour());
|
||||||
|
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||||
|
dc.DrawRectangle(nmlv->nmcd.rc.left, nmlv->nmcd.rc.top,
|
||||||
|
nmlv->nmcd.rc.right - nmlv->nmcd.rc.left,
|
||||||
|
nmlv->nmcd.rc.bottom - nmlv->nmcd.rc.top);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defer to wxWidgets for normal processing.
|
||||||
|
return wxListCtrl::MSWOnNotify(id, lparam, result);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -62,6 +62,10 @@ public:
|
||||||
NUMBER_OF_COLUMN
|
NUMBER_OF_COLUMN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
bool MSWOnNotify(int id, WXLPARAM lparam, WXLPARAM* result) override;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<int> m_FlagImageIndex;
|
std::vector<int> m_FlagImageIndex;
|
||||||
std::vector<int> m_PlatformImageIndex;
|
std::vector<int> m_PlatformImageIndex;
|
||||||
|
|
|
@ -315,11 +315,11 @@ void DolphinApp::InitLanguageSupport()
|
||||||
m_locale.reset(new wxLocale(language));
|
m_locale.reset(new wxLocale(language));
|
||||||
|
|
||||||
// Specify where dolphins *.gmo files are located on each operating system
|
// Specify where dolphins *.gmo files are located on each operating system
|
||||||
#ifdef _WIN32
|
#ifdef __WXMSW__
|
||||||
m_locale->AddCatalogLookupPathPrefix(StrToWxStr(File::GetExeDirectory() + DIR_SEP "Languages"));
|
m_locale->AddCatalogLookupPathPrefix(StrToWxStr(File::GetExeDirectory() + DIR_SEP "Languages"));
|
||||||
#elif defined(__LINUX__)
|
#elif defined(__WXGTK__)
|
||||||
m_locale->AddCatalogLookupPathPrefix(StrToWxStr(DATA_DIR "../locale"));
|
m_locale->AddCatalogLookupPathPrefix(StrToWxStr(DATA_DIR "../locale"));
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__WXOSX__)
|
||||||
m_locale->AddCatalogLookupPathPrefix(
|
m_locale->AddCatalogLookupPathPrefix(
|
||||||
StrToWxStr(File::GetBundleDirectory() + "Contents/Resources"));
|
StrToWxStr(File::GetBundleDirectory() + "Contents/Resources"));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue