DolphinWX: Stop using XPM images
Using the XPM format for images has become a maintenance problem because people don't know how to create them. This commit removes all XPM images and all C files that contain PNG images. DolphinWX now uses the PNGs in the Resources folder instead, just like DolphinQt and DolphinQt2 do.
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 214 B |
|
After Width: | Height: | Size: 530 B |
|
After Width: | Height: | Size: 810 B |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 428 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -79,7 +79,7 @@ IVolume::ECountry CountrySwitch(u8 country_code)
|
||||
{
|
||||
switch (country_code)
|
||||
{
|
||||
// Region free - Uses European flag as placeholder
|
||||
// Worldwide
|
||||
case 'A':
|
||||
return IVolume::COUNTRY_WORLD;
|
||||
|
||||
|
||||
@@ -18,33 +18,15 @@
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "DolphinWX/AboutDolphin.h"
|
||||
#include "DolphinWX/resources/dolphin_logo.cpp"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
|
||||
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id,
|
||||
const wxString &title, const wxPoint &position,
|
||||
const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
const unsigned char* dolphin_logo_bin = dolphin_logo_png;
|
||||
size_t dolphin_logo_size = sizeof dolphin_logo_png;
|
||||
#ifdef __APPLE__
|
||||
double scaleFactor = 1.0;
|
||||
if (GetContentScaleFactor() >= 2)
|
||||
{
|
||||
dolphin_logo_bin = dolphin_logo_2x_png;
|
||||
dolphin_logo_size = sizeof dolphin_logo_2x_png;
|
||||
scaleFactor = 2.0;
|
||||
}
|
||||
#endif
|
||||
wxMemoryInputStream istream(dolphin_logo_bin, dolphin_logo_size);
|
||||
wxImage iDolphinLogo(istream, wxBITMAP_TYPE_PNG);
|
||||
#ifdef __APPLE__
|
||||
wxGenericStaticBitmap* const sbDolphinLogo = new wxGenericStaticBitmap(this, wxID_ANY,
|
||||
wxBitmap(iDolphinLogo, -1, scaleFactor));
|
||||
#else
|
||||
wxGenericStaticBitmap* const sbDolphinLogo = new wxGenericStaticBitmap(this, wxID_ANY,
|
||||
wxBitmap(iDolphinLogo));
|
||||
#endif
|
||||
WxUtils::LoadResourceBitmap("dolphin_logo", true));
|
||||
|
||||
const wxString DolphinText = _("Dolphin");
|
||||
const wxString RevisionText = scm_desc_str;
|
||||
|
||||
@@ -23,12 +23,6 @@
|
||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||
#include "DolphinWX/Debugger/MemoryCheckDlg.h"
|
||||
|
||||
extern "C" {
|
||||
#include "DolphinWX/resources/toolbar_add_breakpoint.c"
|
||||
#include "DolphinWX/resources/toolbar_add_memorycheck.c"
|
||||
#include "DolphinWX/resources/toolbar_debugger_delete.c"
|
||||
}
|
||||
|
||||
class CBreakPointBar : public wxAuiToolBar
|
||||
{
|
||||
public:
|
||||
@@ -38,9 +32,9 @@ public:
|
||||
{
|
||||
SetToolBitmapSize(wxSize(24, 24));
|
||||
|
||||
m_Bitmaps[Toolbar_Delete] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(16, 16));
|
||||
m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(16, 16));
|
||||
m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(16, 16));
|
||||
m_Bitmaps[Toolbar_Delete] = WxUtils::LoadResourceBitmap("toolbar_debugger_delete");
|
||||
m_Bitmaps[Toolbar_Add_BP] = WxUtils::LoadResourceBitmap("toolbar_add_breakpoint");
|
||||
m_Bitmaps[Toolbar_Add_MC] = WxUtils::LoadResourceBitmap("toolbar_add_memorycheck");
|
||||
|
||||
AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]);
|
||||
Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
|
||||
|
||||
@@ -45,12 +45,6 @@
|
||||
#include "DolphinWX/Debugger/RegisterWindow.h"
|
||||
#include "DolphinWX/Debugger/WatchWindow.h"
|
||||
|
||||
extern "C" // Bitmaps
|
||||
{
|
||||
#include "DolphinWX/resources/toolbar_add_memorycheck.c" // NOLINT
|
||||
#include "DolphinWX/resources/toolbar_add_breakpoint.c" // NOLINT
|
||||
}
|
||||
|
||||
CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame *parent,
|
||||
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
|
||||
: wxPanel(parent, id, position, size, style, name)
|
||||
@@ -654,17 +648,12 @@ bool CCodeWindow::JITNoBlockLinking()
|
||||
// Toolbar
|
||||
void CCodeWindow::InitBitmaps()
|
||||
{
|
||||
// load original size 48x48
|
||||
m_Bitmaps[Toolbar_Step] = wxGetBitmapFromMemory(toolbar_add_breakpoint_png);
|
||||
m_Bitmaps[Toolbar_StepOver] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_StepOut] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_Skip] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_GotoPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_SetPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
|
||||
// scale to 24x24 for toolbar
|
||||
for (auto& bitmap : m_Bitmaps)
|
||||
bitmap = wxBitmap(bitmap.ConvertToImage().Scale(24, 24));
|
||||
m_Bitmaps[Toolbar_Step] = WxUtils::LoadResourceBitmap("toolbar_debugger_step");
|
||||
m_Bitmaps[Toolbar_StepOver] = WxUtils::LoadResourceBitmap("toolbar_debugger_step_over");
|
||||
m_Bitmaps[Toolbar_StepOut] = WxUtils::LoadResourceBitmap("toolbar_debugger_step_out");
|
||||
m_Bitmaps[Toolbar_Skip] = WxUtils::LoadResourceBitmap("toolbar_debugger_skip");
|
||||
m_Bitmaps[Toolbar_GotoPC] = WxUtils::LoadResourceBitmap("toolbar_debugger_goto_pc");
|
||||
m_Bitmaps[Toolbar_SetPC] = WxUtils::LoadResourceBitmap("toolbar_debugger_set_pc");
|
||||
}
|
||||
|
||||
void CCodeWindow::PopulateToolbar(wxToolBar* toolBar)
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#include "DolphinWX/Debugger/WatchView.h"
|
||||
#include "DolphinWX/Debugger/WatchWindow.h"
|
||||
|
||||
extern "C" {
|
||||
#include "DolphinWX/resources/toolbar_debugger_delete.c"
|
||||
}
|
||||
|
||||
class CWatchToolbar : public wxAuiToolBar
|
||||
{
|
||||
public:
|
||||
@@ -29,7 +25,7 @@ CWatchToolbar(CWatchWindow* parent, const wxWindowID id)
|
||||
{
|
||||
SetToolBitmapSize(wxSize(16, 16));
|
||||
|
||||
m_Bitmaps[Toolbar_File] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(16, 16));
|
||||
m_Bitmaps[Toolbar_File] = WxUtils::LoadResourceBitmap("toolbar_debugger_delete");
|
||||
|
||||
AddTool(ID_LOAD, _("Load"), m_Bitmaps[Toolbar_File]);
|
||||
Bind(wxEVT_TOOL, &CWatchWindow::Event_LoadAll, parent, ID_LOAD);
|
||||
|
||||