mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 08:29:27 +02:00
Clickable Start - Length and stable position of '<' and '>'
Minor tweaks to Selection Toolbar field chooser.
This commit is contained in:
parent
ca01b55d1b
commit
389335d761
@ -291,6 +291,7 @@ void SelectionBar::Populate()
|
|||||||
mButtonTitles[1] = AddTitle( "Start - End ", CentralNameID, hSizer.get() );
|
mButtonTitles[1] = AddTitle( "Start - End ", CentralNameID, hSizer.get() );
|
||||||
mButtonTitles[2] = AddTitle( " >", RightID, hSizer.get() );
|
mButtonTitles[2] = AddTitle( " >", RightID, hSizer.get() );
|
||||||
mButtonTitles[0]->Bind( wxEVT_LEFT_DOWN,&SelectionBar::OnModeDecClicked,this );
|
mButtonTitles[0]->Bind( wxEVT_LEFT_DOWN,&SelectionBar::OnModeDecClicked,this );
|
||||||
|
mButtonTitles[1]->Bind( wxEVT_LEFT_DOWN,&SelectionBar::OnChooserTitleClicked, this );
|
||||||
mButtonTitles[2]->Bind( wxEVT_LEFT_DOWN,&SelectionBar::OnModeIncClicked,this );
|
mButtonTitles[2]->Bind( wxEVT_LEFT_DOWN,&SelectionBar::OnModeIncClicked,this );
|
||||||
vSizer->Add( hSizer.release(), 0, wxALIGN_CENTER, 0);
|
vSizer->Add( hSizer.release(), 0, wxALIGN_CENTER, 0);
|
||||||
mainSizer->Add(vSizer.release(), 0, wxALIGN_CENTER, 0 );
|
mainSizer->Add(vSizer.release(), 0, wxALIGN_CENTER, 0 );
|
||||||
@ -596,13 +597,19 @@ void SelectionBar::OnEndTitleClicked(wxMouseEvent & event){ OnTitleClicked( EndT
|
|||||||
void SelectionBar::OnModeDecClicked(wxMouseEvent & event){
|
void SelectionBar::OnModeDecClicked(wxMouseEvent & event){
|
||||||
SetSelectionMode( (mSelectionMode +3)%4 );
|
SetSelectionMode( (mSelectionMode +3)%4 );
|
||||||
SelectionModeUpdated();
|
SelectionModeUpdated();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionBar::OnModeIncClicked(wxMouseEvent & event){
|
void SelectionBar::OnModeIncClicked(wxMouseEvent & event){
|
||||||
SetSelectionMode( (mSelectionMode +1)%4 );
|
SetSelectionMode( (mSelectionMode +1)%4 );
|
||||||
SelectionModeUpdated();
|
SelectionModeUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SelectionBar::OnChooserTitleClicked(wxMouseEvent & event){
|
||||||
|
wxCommandEvent evt;
|
||||||
|
OnButton( evt );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Called when one of the format drop downs is changed.
|
// Called when one of the format drop downs is changed.
|
||||||
void SelectionBar::OnUpdate(wxCommandEvent &evt)
|
void SelectionBar::OnUpdate(wxCommandEvent &evt)
|
||||||
{
|
{
|
||||||
@ -780,7 +787,7 @@ void SelectionBar::SetSelectionMode(int mode)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SEL_BUTTON_TITLES
|
#ifdef SEL_BUTTON_TITLES
|
||||||
wxString CenterNames[] = { "Start - End ", " Start - Length", "Length - End ", "Length - Center" };
|
wxString CenterNames[] = { " Start - End ", " Start - Length ", " Length - End ", " Length - Center " };
|
||||||
mButtonTitles[1]->SetLabel( CenterNames[mode] );
|
mButtonTitles[1]->SetLabel( CenterNames[mode] );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ class SelectionBar final : public ToolBar {
|
|||||||
|
|
||||||
void OnModeDecClicked(wxMouseEvent & event);
|
void OnModeDecClicked(wxMouseEvent & event);
|
||||||
void OnModeIncClicked(wxMouseEvent & event);
|
void OnModeIncClicked(wxMouseEvent & event);
|
||||||
|
void OnChooserTitleClicked(wxMouseEvent & event);
|
||||||
|
|
||||||
void OnRate(wxCommandEvent & event);
|
void OnRate(wxCommandEvent & event);
|
||||||
void OnSnapTo(wxCommandEvent & event);
|
void OnSnapTo(wxCommandEvent & event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user