mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 06:06:24 +01:00
Options for constructing ASlider, and can specify scroll increments
This commit is contained in:
@@ -78,8 +78,8 @@ void MixerToolBar::Populate()
|
||||
wxID_ANY,
|
||||
theTheme.Bitmap(bmpMic)), 0, wxALIGN_CENTER);
|
||||
mInputSlider = safenew ASlider(this, wxID_ANY, _("Recording Volume"),
|
||||
wxDefaultPosition, wxSize(130, 25));
|
||||
mInputSlider->SetScroll(0.1f, 2.0f);
|
||||
wxDefaultPosition, wxSize(130, 25),
|
||||
ASlider::Options{}.Line( 0.1f ).Page( 2.0f ));
|
||||
mInputSlider->SetName(_("Slider Recording"));
|
||||
Add(mInputSlider, 0, wxALIGN_CENTER);
|
||||
|
||||
@@ -88,8 +88,8 @@ void MixerToolBar::Populate()
|
||||
wxID_ANY,
|
||||
theTheme.Bitmap(bmpSpeaker)), 0, wxALIGN_CENTER);
|
||||
mOutputSlider = safenew ASlider(this, wxID_ANY, _("Playback Volume"),
|
||||
wxDefaultPosition, wxSize(130, 25));
|
||||
mOutputSlider->SetScroll(0.1f, 2.0f);
|
||||
wxDefaultPosition, wxSize(130, 25),
|
||||
ASlider::Options{}.Line( 0.1f ).Page( 2.0f ));
|
||||
mOutputSlider->SetName(_("Slider Playback"));
|
||||
Add(mOutputSlider, 0, wxALIGN_CENTER);
|
||||
|
||||
|
||||
@@ -186,15 +186,18 @@ void TranscriptionToolBar::Populate()
|
||||
//Add a slider that controls the speed of playback.
|
||||
const int SliderWidth=100;
|
||||
mPlaySpeedSlider = safenew ASlider(this,
|
||||
TTB_PlaySpeedSlider,
|
||||
_("Playback Speed"),
|
||||
wxDefaultPosition,
|
||||
wxSize(SliderWidth,25),
|
||||
SPEED_SLIDER);
|
||||
TTB_PlaySpeedSlider,
|
||||
_("Playback Speed"),
|
||||
wxDefaultPosition,
|
||||
wxSize(SliderWidth,25),
|
||||
ASlider::Options{}
|
||||
.Style( SPEED_SLIDER )
|
||||
// 6 steps using page up/down, and 60 using arrow keys
|
||||
.Line( 0.16667f )
|
||||
.Page( 0.16667f )
|
||||
);
|
||||
mPlaySpeedSlider->Set(mPlaySpeed / 100.0);
|
||||
mPlaySpeedSlider->SetLabel(_("Playback Speed"));
|
||||
// 6 steps using page up/down, and 60 using arrow keys
|
||||
mPlaySpeedSlider->SetScroll(0.16667f, 1.6667f);
|
||||
Add( mPlaySpeedSlider, 0, wxALIGN_CENTER );
|
||||
mPlaySpeedSlider->Connect(wxEVT_SET_FOCUS,
|
||||
wxFocusEventHandler(TranscriptionToolBar::OnFocus),
|
||||
|
||||
Reference in New Issue
Block a user