mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
Steve's fix for bug/enhancement 74.
This commit is contained in:
parent
bcff3a8a86
commit
b04c7f18a7
@ -123,7 +123,6 @@ void MixerToolBar::Populate()
|
||||
this);
|
||||
// Show or hide the input slider based on whether it works
|
||||
mInputSlider->Enable(gAudioIO->InputMixerWorks());
|
||||
SetToolTips();
|
||||
|
||||
UpdateControls();
|
||||
|
||||
@ -181,7 +180,6 @@ void MixerToolBar::UpdatePrefs()
|
||||
|
||||
// Show or hide the input slider based on whether it works
|
||||
mInputSlider->Enable(gAudioIO->InputMixerWorks());
|
||||
SetToolTips();
|
||||
|
||||
// Layout the toolbar
|
||||
Layout();
|
||||
@ -218,10 +216,14 @@ void MixerToolBar::UpdateControls()
|
||||
|
||||
if (mOutputSlider->Get() != playbackVolume) {
|
||||
mOutputSlider->Set(playbackVolume);
|
||||
mOutputSliderVolume = playbackVolume;
|
||||
SetToolTips();
|
||||
}
|
||||
|
||||
if (mInputSlider->Get() != inputVolume) {
|
||||
mInputSlider->Set(inputVolume);
|
||||
mInputSliderVolume = inputVolume;
|
||||
SetToolTips();
|
||||
}
|
||||
#endif // USE_PORTMIXER
|
||||
}
|
||||
@ -236,6 +238,9 @@ void MixerToolBar::SetMixer(wxCommandEvent &event)
|
||||
|
||||
gAudioIO->GetMixer(&inputSource, &oldIn, &oldOut);
|
||||
gAudioIO->SetMixer(inputSource, inputVolume, outputVolume);
|
||||
mOutputSliderVolume = outputVolume;
|
||||
mInputSliderVolume = inputVolume;
|
||||
SetToolTips();
|
||||
#endif // USE_PORTMIXER
|
||||
}
|
||||
|
||||
@ -285,7 +290,8 @@ void MixerToolBar::SetToolTips()
|
||||
{
|
||||
#if wxUSE_TOOLTIPS
|
||||
if (mInputSlider->IsEnabled()) {
|
||||
mInputSlider->SetToolTip(_("Input Volume"));
|
||||
mInputSlider->SetToolTip(wxString::Format(
|
||||
_("Input Volume: %.2f"), mInputSliderVolume));
|
||||
}
|
||||
else {
|
||||
mInputSlider->SetToolTip(
|
||||
@ -293,7 +299,8 @@ void MixerToolBar::SetToolTips()
|
||||
}
|
||||
|
||||
if (mOutputSlider->IsEnabled()) {
|
||||
mOutputSlider->SetToolTip(_("Output Volume"));
|
||||
mOutputSlider->SetToolTip(wxString::Format(
|
||||
_("Output Volume: %.2f"), mOutputSliderVolume));
|
||||
}
|
||||
else {
|
||||
mOutputSlider->SetToolTip(
|
||||
|
@ -50,6 +50,10 @@ class MixerToolBar:public ToolBar {
|
||||
void AdjustOutputGain(int adj);
|
||||
void AdjustInputGain(int adj);
|
||||
|
||||
protected:
|
||||
float mInputSliderVolume;
|
||||
float mOutputSliderVolume;
|
||||
|
||||
private:
|
||||
|
||||
void InitializeMixerToolBar();
|
||||
|
@ -897,7 +897,7 @@ void LWSlider::FormatPopWin()
|
||||
|
||||
switch(mStyle) {
|
||||
case FRAC_SLIDER:
|
||||
label.Printf(wxT("%s: %.1f"), mName.c_str(), mCurrentValue);
|
||||
label.Printf(wxT("%s: %.2f"), mName.c_str(), mCurrentValue);
|
||||
break;
|
||||
|
||||
case DB_SLIDER:
|
||||
|
Loading…
x
Reference in New Issue
Block a user