mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Update wxWidgets to 3.1.0
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7. include/wx/defs.h -- __w64 warning disable patch by comex brought forward. include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code. src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux. src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue. src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text). Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
This commit is contained in:
@ -117,7 +117,7 @@ AboutDolphin::AboutDolphin(wxWindow* parent, wxWindowID id, const wxString& titl
|
||||
|
||||
wxBoxSizer* const sFooter = new wxBoxSizer(wxVERTICAL);
|
||||
sFooter->AddSpacer(15);
|
||||
sFooter->Add(Copyright, 0, wxALIGN_BOTTOM | wxALIGN_CENTER_HORIZONTAL);
|
||||
sFooter->Add(Copyright, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
sFooter->AddSpacer(5);
|
||||
|
||||
wxBoxSizer* const sMain = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -411,15 +411,15 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
wxPen nullPen(bgColor);
|
||||
wxPen currentPen(*wxBLACK_PEN);
|
||||
wxPen selPen(*wxGREY_PEN);
|
||||
nullPen.SetStyle(wxTRANSPARENT);
|
||||
currentPen.SetStyle(wxSOLID);
|
||||
nullPen.SetStyle(wxPENSTYLE_TRANSPARENT);
|
||||
currentPen.SetStyle(wxPENSTYLE_SOLID);
|
||||
wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
|
||||
wxBrush pcBrush(*wxGREEN_BRUSH);
|
||||
wxBrush bpBrush(*wxRED_BRUSH);
|
||||
|
||||
wxBrush bgBrush(bgColor);
|
||||
wxBrush nullBrush(bgColor);
|
||||
nullBrush.SetStyle(wxTRANSPARENT);
|
||||
nullBrush.SetStyle(wxBRUSHSTYLE_TRANSPARENT);
|
||||
|
||||
ctx->SetPen(nullPen);
|
||||
ctx->SetBrush(bgBrush);
|
||||
|
@ -6,4 +6,5 @@
|
||||
#include <wx/font.h>
|
||||
|
||||
// The default font
|
||||
wxFont DebuggerFont = wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false, "monospace");
|
||||
wxFont DebuggerFont{9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||
false, "monospace"};
|
||||
|
@ -253,19 +253,19 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||
// TODO: Add any drawing code here...
|
||||
int width = rc.width;
|
||||
int numRows = (rc.height / rowHeight) / 2 + 2;
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.SetBackgroundMode(wxPENSTYLE_TRANSPARENT);
|
||||
const wxColour bgColor = *wxWHITE;
|
||||
wxPen nullPen(bgColor);
|
||||
wxPen currentPen(*wxBLACK_PEN);
|
||||
wxPen selPen(*wxGREY_PEN);
|
||||
nullPen.SetStyle(wxTRANSPARENT);
|
||||
nullPen.SetStyle(wxPENSTYLE_TRANSPARENT);
|
||||
|
||||
wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
|
||||
wxBrush pcBrush(*wxGREEN_BRUSH);
|
||||
wxBrush mcBrush(*wxBLUE_BRUSH);
|
||||
wxBrush bgBrush(bgColor);
|
||||
wxBrush nullBrush(bgColor);
|
||||
nullBrush.SetStyle(wxTRANSPARENT);
|
||||
nullBrush.SetStyle(wxBRUSHSTYLE_TRANSPARENT);
|
||||
|
||||
dc.SetPen(nullPen);
|
||||
dc.SetBrush(bgBrush);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
@ -50,6 +50,9 @@
|
||||
</ResourceCompile>
|
||||
<ClCompile />
|
||||
<ClCompile />
|
||||
<Manifest>
|
||||
<EnableDpiAwareness>true</EnableDpiAwareness>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AboutDolphin.cpp" />
|
||||
|
@ -554,7 +554,7 @@ void CFrame::PopulateToolbar(wxToolBar* ToolBar)
|
||||
// Delete and recreate the toolbar
|
||||
void CFrame::RecreateToolbar()
|
||||
{
|
||||
static const long TOOLBAR_STYLE = wxTB_DEFAULT_STYLE | wxTB_TEXT;
|
||||
static const long TOOLBAR_STYLE = wxTB_DEFAULT_STYLE | wxTB_TEXT | wxTB_FLAT;
|
||||
|
||||
if (m_ToolBar != nullptr)
|
||||
{
|
||||
|
@ -142,9 +142,9 @@ NetPlaySetupFrame::NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl
|
||||
|
||||
wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
top_szr->Add(m_ip_lbl, 0, wxCENTER | wxRIGHT, 5);
|
||||
top_szr->Add(m_ip_lbl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
||||
top_szr->Add(m_connect_ip_text, 3);
|
||||
top_szr->Add(m_client_port_lbl, 0, wxCENTER | wxRIGHT | wxLEFT, 5);
|
||||
top_szr->Add(m_client_port_lbl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 5);
|
||||
top_szr->Add(m_connect_port_text, 1);
|
||||
|
||||
wxBoxSizer* const con_szr = new wxBoxSizer(wxVERTICAL);
|
||||
@ -195,7 +195,7 @@ NetPlaySetupFrame::NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl
|
||||
top_szr->Add(m_host_port_text, 0);
|
||||
#ifdef USE_UPNP
|
||||
m_upnp_chk = new wxCheckBox(host_tab, wxID_ANY, _("Forward port (UPnP)"));
|
||||
top_szr->Add(m_upnp_chk, 0, wxALL | wxALIGN_RIGHT, 5);
|
||||
top_szr->Add(m_upnp_chk, 0, wxALL, 5);
|
||||
#endif
|
||||
wxBoxSizer* const bottom_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||
bottom_szr->Add(m_traversal_listen_port_enabled, 0, wxCENTER | wxLEFT, 5);
|
||||
|
@ -263,9 +263,7 @@ wxBoxSizer* TASInputDlg::CreateCCLayout()
|
||||
m_cc_r_stick_szr = CreateStickLayout(&m_cc_r_stick, _("Right stick"));
|
||||
|
||||
m_cc_l = CreateControl(wxSL_VERTICAL, -1, 100, false, 31, 0);
|
||||
;
|
||||
m_cc_r = CreateControl(wxSL_VERTICAL, -1, 100, false, 31, 0);
|
||||
;
|
||||
|
||||
wxStaticBoxSizer* const shoulder_box =
|
||||
new wxStaticBoxSizer(wxHORIZONTAL, this, _("Shoulder Buttons"));
|
||||
@ -289,7 +287,8 @@ wxBoxSizer* TASInputDlg::CreateCCLayout()
|
||||
cc_buttons_dpad->AddSpacer(20);
|
||||
|
||||
for (auto button : m_cc_buttons)
|
||||
cc_buttons_grid->Add(button.checkbox);
|
||||
if (!button.checkbox->GetContainingSizer())
|
||||
cc_buttons_grid->Add(button.checkbox);
|
||||
cc_buttons_grid->AddSpacer(5);
|
||||
|
||||
cc_buttons_box->Add(cc_buttons_grid);
|
||||
@ -442,26 +441,23 @@ TASInputDlg::Stick TASInputDlg::CreateStick(int id_stick, int xRange, int yRange
|
||||
tempStick.bitmap->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this);
|
||||
tempStick.x_cont = CreateControl(wxSL_HORIZONTAL | (reverseX ? wxSL_INVERSE : 0), 120, -1,
|
||||
reverseX, xRange, defaultX);
|
||||
tempStick.y_cont = CreateControl(wxSL_VERTICAL | (reverseY ? wxSL_INVERSE : 0), -1, 120, reverseY,
|
||||
yRange, defaultY);
|
||||
tempStick.y_cont = CreateControl(wxSL_VERTICAL | wxSL_LEFT | (reverseY ? wxSL_INVERSE : 0), -1,
|
||||
120, reverseY, yRange, defaultY);
|
||||
return tempStick;
|
||||
}
|
||||
|
||||
wxStaticBoxSizer* TASInputDlg::CreateStickLayout(Stick* tempStick, const wxString& title)
|
||||
{
|
||||
wxStaticBoxSizer* const temp_box = new wxStaticBoxSizer(wxHORIZONTAL, this, title);
|
||||
wxBoxSizer* const temp_xslider_box = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* const temp_yslider_box = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* const temp_stick_box = new wxBoxSizer(wxVERTICAL);
|
||||
wxFlexGridSizer* grid = new wxFlexGridSizer(2, 3, 3);
|
||||
|
||||
temp_xslider_box->Add(tempStick->x_cont.slider, 0, wxALIGN_TOP);
|
||||
temp_xslider_box->Add(tempStick->x_cont.text, 0, wxALIGN_TOP);
|
||||
temp_stick_box->Add(temp_xslider_box);
|
||||
temp_stick_box->Add(tempStick->bitmap, 0, wxALL | wxALIGN_CENTER, 3);
|
||||
temp_box->Add(temp_stick_box);
|
||||
temp_yslider_box->Add(tempStick->y_cont.slider, 0, wxALIGN_CENTER_VERTICAL);
|
||||
temp_yslider_box->Add(tempStick->y_cont.text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
temp_box->Add(temp_yslider_box);
|
||||
grid->Add(tempStick->x_cont.slider, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM);
|
||||
grid->Add(tempStick->x_cont.text, 0, wxEXPAND);
|
||||
grid->Add(tempStick->bitmap, 0, wxALL | wxALIGN_CENTER, 3);
|
||||
grid->Add(tempStick->y_cont.slider, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
|
||||
grid->Add(1, 1);
|
||||
grid->Add(tempStick->y_cont.text, 0, wxEXPAND);
|
||||
temp_box->Add(grid, 1, wxEXPAND | wxALL, 3);
|
||||
return temp_box;
|
||||
}
|
||||
|
||||
@ -473,12 +469,12 @@ wxStaticBoxSizer* TASInputDlg::CreateAccelLayout(Control* x, Control* y, Control
|
||||
wxStaticBoxSizer* const yBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Y"));
|
||||
wxStaticBoxSizer* const zBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Z"));
|
||||
|
||||
xBox->Add(x->slider, 0, wxALIGN_CENTER_VERTICAL);
|
||||
xBox->Add(x->text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
yBox->Add(y->slider, 0, wxALIGN_CENTER_VERTICAL);
|
||||
yBox->Add(y->text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
zBox->Add(z->slider, 0, wxALIGN_CENTER_VERTICAL);
|
||||
zBox->Add(z->text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
xBox->Add(x->slider, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
xBox->Add(x->text, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
yBox->Add(y->slider, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
yBox->Add(y->text, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
zBox->Add(z->slider, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
zBox->Add(z->text, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||
temp_box->Add(xBox, 0, wxLEFT | wxBOTTOM | wxRIGHT, 5);
|
||||
temp_box->Add(yBox, 0, wxRIGHT, 5);
|
||||
temp_box->Add(zBox, 0, wxRIGHT, 5);
|
||||
@ -1208,13 +1204,9 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
|
||||
memDC.SetBackground(*wxLIGHT_GREY_BRUSH);
|
||||
memDC.Clear();
|
||||
memDC.SetBrush(*wxWHITE_BRUSH);
|
||||
memDC.DrawCircle(65, 65, 64);
|
||||
memDC.SetBrush(*wxRED_BRUSH);
|
||||
memDC.DrawCircle(64, 64, 64);
|
||||
memDC.SetPen(wxPen(*wxBLACK, 3, wxPENSTYLE_SOLID));
|
||||
memDC.DrawLine(64, 64, x, y);
|
||||
memDC.DrawLine(63, 64, x - 1, y);
|
||||
memDC.DrawLine(65, 64, x + 1, y);
|
||||
memDC.DrawLine(64, 63, x, y - 1);
|
||||
memDC.DrawLine(64, 65, x, y + 1);
|
||||
memDC.SetPen(*wxBLACK_PEN);
|
||||
memDC.CrossHair(64, 64);
|
||||
memDC.SetBrush(*wxBLUE_BRUSH);
|
||||
|
Reference in New Issue
Block a user