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