summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-07-15 09:48:14 -0400
committerGitHub <noreply@github.com>2016-07-15 09:48:14 -0400
commitfac7d090919d260aa4c0e62d4e3e5e4f31b921ae (patch)
tree5c9b7e0dab181a65844af581984f6c1bebea9310 /Source
parent7ca32f4b97592728ed17252c8fd4e83bf8d869c0 (diff)
parent822326eea9734a25a7dd36fd9367b7e0af71fc8e (diff)
Merge pull request #3737 from EmptyChaos/update-wx
Externals: Update wxWidgets to 3.1.0
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/AboutDolphin.cpp2
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeView.cpp6
-rw-r--r--Source/Core/DolphinWX/Debugger/DebuggerUIUtil.cpp3
-rw-r--r--Source/Core/DolphinWX/Debugger/MemoryView.cpp6
-rw-r--r--Source/Core/DolphinWX/DolphinWX.vcxproj5
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp2
-rw-r--r--Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp6
-rw-r--r--Source/Core/DolphinWX/TASInputDlg.cpp50
8 files changed, 38 insertions, 42 deletions
diff --git a/Source/Core/DolphinWX/AboutDolphin.cpp b/Source/Core/DolphinWX/AboutDolphin.cpp
index 71004e9417..2cd29278a4 100644
--- a/Source/Core/DolphinWX/AboutDolphin.cpp
+++ b/Source/Core/DolphinWX/AboutDolphin.cpp
@@ -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);
diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp
index 2eb9ad093d..22119b6bac 100644
--- a/Source/Core/DolphinWX/Debugger/CodeView.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp
@@ -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);
diff --git a/Source/Core/DolphinWX/Debugger/DebuggerUIUtil.cpp b/Source/Core/DolphinWX/Debugger/DebuggerUIUtil.cpp
index 1dc7d4547a..ac4ff03fef 100644
--- a/Source/Core/DolphinWX/Debugger/DebuggerUIUtil.cpp
+++ b/Source/Core/DolphinWX/Debugger/DebuggerUIUtil.cpp
@@ -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"};
diff --git a/Source/Core/DolphinWX/Debugger/MemoryView.cpp b/Source/Core/DolphinWX/Debugger/MemoryView.cpp
index 2af3dba977..195cd965b3 100644
--- a/Source/Core/DolphinWX/Debugger/MemoryView.cpp
+++ b/Source/Core/DolphinWX/Debugger/MemoryView.cpp
@@ -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);
diff --git a/Source/Core/DolphinWX/DolphinWX.vcxproj b/Source/Core/DolphinWX/DolphinWX.vcxproj
index ba66d9a20c..56a434ae64 100644
--- a/Source/Core/DolphinWX/DolphinWX.vcxproj
+++ b/Source/Core/DolphinWX/DolphinWX.vcxproj
@@ -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" />
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index fc53515fa6..79e395337f 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.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)
{
diff --git a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
index 591c27c7e1..1e845d59bb 100644
--- a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
+++ b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
@@ -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);
diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp
index edad81cc59..f732f65871 100644
--- a/Source/Core/DolphinWX/TASInputDlg.cpp
+++ b/Source/Core/DolphinWX/TASInputDlg.cpp
@@ -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);
-
- 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);
+ wxFlexGridSizer* grid = new wxFlexGridSizer(2, 3, 3);
+
+ 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);