mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-20 06:10:06 +02:00
AdornedRulerPanel updates itself in response to theme change event
This commit is contained in:
parent
c742199d47
commit
1c1aca521d
@ -46,6 +46,7 @@
|
||||
#include "ViewInfo.h"
|
||||
#include "prefs/TracksBehaviorsPrefs.h"
|
||||
#include "prefs/TracksPrefs.h"
|
||||
#include "prefs/ThemePrefs.h"
|
||||
#include "toolbars/ToolBar.h"
|
||||
#include "tracks/ui/Scrubbing.h"
|
||||
#include "tracks/ui/TrackView.h"
|
||||
@ -938,6 +939,8 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* project,
|
||||
|
||||
// Delay until after CommandManager has been populated:
|
||||
this->CallAfter( &AdornedRulerPanel::UpdatePrefs );
|
||||
|
||||
wxTheApp->Bind(EVT_THEME_CHANGE, &AdornedRulerPanel::OnThemeChange, this);
|
||||
}
|
||||
|
||||
AdornedRulerPanel::~AdornedRulerPanel()
|
||||
@ -1185,6 +1188,11 @@ void AdornedRulerPanel::OnSize(wxSizeEvent &evt)
|
||||
OverlayPanel::OnSize(evt);
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::OnThemeChange(wxCommandEvent& evt)
|
||||
{
|
||||
ReCreateButtons();
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::UpdateRects()
|
||||
{
|
||||
mInner = mOuter;
|
||||
|
@ -79,6 +79,7 @@ private:
|
||||
void OnRecordStartStop(wxCommandEvent & evt);
|
||||
void OnPaint(wxPaintEvent &evt);
|
||||
void OnSize(wxSizeEvent &evt);
|
||||
void OnThemeChange(wxCommandEvent& evt);
|
||||
void UpdateRects();
|
||||
void HandleQPClick(wxMouseEvent &event, wxCoord mousePosX);
|
||||
void HandleQPDrag(wxMouseEvent &event, wxCoord mousePosX);
|
||||
|
@ -734,7 +734,6 @@ void ProjectWindow::OnThemeChange(wxCommandEvent& evt)
|
||||
if( pToolBar )
|
||||
pToolBar->ReCreateButtons();
|
||||
}
|
||||
AdornedRulerPanel::Get( project ).ReCreateButtons();
|
||||
}
|
||||
|
||||
void ProjectWindow::UpdatePrefs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user