From 490012b5ebe744f1e6efee898f9ec952b8ce95f8 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Wed, 2 Feb 2022 00:54:48 +0530 Subject: [PATCH] Fix wxBitmapToggleButton function parameters for the new wx update. --- src/GUI/TransportControls.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/GUI/TransportControls.cpp b/src/GUI/TransportControls.cpp index c25200e..84ee5b3 100644 --- a/src/GUI/TransportControls.cpp +++ b/src/GUI/TransportControls.cpp @@ -30,6 +30,8 @@ #include "Utility/Paths.hpp" #include "Utility/Utils.hpp" +#include + cTransportControls::cTransportControls(wxWindow* window, wxMediaCtrl& mediaCtrl) : wxPanel(window, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxNO_BORDER), m_MediaCtrl(mediaCtrl) @@ -38,10 +40,12 @@ cTransportControls::cTransportControls(wxWindow* window, wxMediaCtrl& mediaCtrl) // Looping region controls if (m_Theme.IsDark()) - m_pLoopABButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_LoopABButton, static_cast(ICON_AB_LIGHT_16px), + m_pLoopABButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_LoopABButton, + wxBitmapBundle::FromBitmap(static_cast(ICON_AB_LIGHT_16px)), wxDefaultPosition, wxDefaultSize, 0); else - m_pLoopABButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_LoopABButton, static_cast(ICON_AB_DARK_16px), + m_pLoopABButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_LoopABButton, + wxBitmapBundle::FromBitmap(static_cast(ICON_AB_DARK_16px)), wxDefaultPosition, wxDefaultSize, 0); m_pLoopABButton->SetToolTip(_("Loop selected region")); @@ -67,12 +71,14 @@ cTransportControls::cTransportControls(wxWindow* window, wxMediaCtrl& mediaCtrl) m_pPlayButton = new wxBitmapButton(this, SampleHive::ID::BC_Play, wxBitmapBundle::FromBitmap(static_cast(ICON_PLAY_LIGHT_16px)), wxDefaultPosition, wxDefaultSize, 0); - m_pLoopButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Loop, static_cast(ICON_LOOP_LIGHT_16px), + m_pLoopButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Loop, + wxBitmapBundle::FromBitmap(static_cast(ICON_LOOP_LIGHT_16px)), wxDefaultPosition, wxDefaultSize, 0); m_pStopButton = new wxBitmapButton(this, SampleHive::ID::BC_Stop, wxBitmapBundle::FromBitmap(static_cast(ICON_STOP_LIGHT_16px)), wxDefaultPosition, wxDefaultSize, 0); - m_pMuteButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Mute, static_cast(ICON_MUTE_LIGHT_16px), + m_pMuteButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Mute, + wxBitmapBundle::FromBitmap(static_cast(ICON_MUTE_LIGHT_16px)), wxDefaultPosition, wxDefaultSize, 0); } else @@ -80,12 +86,14 @@ cTransportControls::cTransportControls(wxWindow* window, wxMediaCtrl& mediaCtrl) m_pPlayButton = new wxBitmapButton(this, SampleHive::ID::BC_Play, wxBitmapBundle::FromBitmap(static_cast(ICON_PLAY_DARK_16px)), wxDefaultPosition, wxDefaultSize, 0); - m_pLoopButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Loop, static_cast(ICON_LOOP_DARK_16px), + m_pLoopButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Loop, + wxBitmapBundle::FromBitmap(static_cast(ICON_LOOP_DARK_16px)), wxDefaultPosition, wxDefaultSize, 0); m_pStopButton = new wxBitmapButton(this, SampleHive::ID::BC_Stop, wxBitmapBundle::FromBitmap(static_cast(ICON_STOP_DARK_16px)), wxDefaultPosition, wxDefaultSize, 0); - m_pMuteButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Mute, static_cast(ICON_MUTE_DARK_16px), + m_pMuteButton = new wxBitmapToggleButton(this, SampleHive::ID::BC_Mute, + wxBitmapBundle::FromBitmap(static_cast(ICON_MUTE_DARK_16px)), wxDefaultPosition, wxDefaultSize, 0); }