mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-24 15:23:52 +02:00
bug 11 followup: remove rec channels label from DeviceToolBar and add input channels to within combobox text
This commit is contained in:
@@ -214,7 +214,6 @@ void DeviceToolBar::DeinitChildren()
|
|||||||
{
|
{
|
||||||
mPlayBitmap = NULL;
|
mPlayBitmap = NULL;
|
||||||
mRecordBitmap = NULL;
|
mRecordBitmap = NULL;
|
||||||
mChannelsLabel = NULL;
|
|
||||||
|
|
||||||
mInput = NULL;
|
mInput = NULL;
|
||||||
mOutput = NULL;
|
mOutput = NULL;
|
||||||
@@ -300,11 +299,6 @@ void DeviceToolBar::Populate()
|
|||||||
mInput->Enable(false);
|
mInput->Enable(false);
|
||||||
|
|
||||||
|
|
||||||
mChannelsLabel = new wxStaticText(this, wxID_ANY, _(" Rec Channels:"),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxALIGN_RIGHT);
|
|
||||||
Add(mChannelsLabel, 0, wxALIGN_CENTER);
|
|
||||||
|
|
||||||
mInputChannels = new wxChoice(this,
|
mInputChannels = new wxChoice(this,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
@@ -530,7 +524,7 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
float ratioUnused;
|
float ratioUnused;
|
||||||
bool constrained = true;
|
bool constrained = true;
|
||||||
wxWindow *window;
|
wxWindow *window;
|
||||||
wxSize desiredInput, desiredOutput, desiredHost, desiredChannels, chanLabel;
|
wxSize desiredInput, desiredOutput, desiredHost, desiredChannels;
|
||||||
float hostRatio, outputRatio, inputRatio, channelsRatio;
|
float hostRatio, outputRatio, inputRatio, channelsRatio;
|
||||||
// if the toolbar is docked then the width we should use is the project width.
|
// if the toolbar is docked then the width we should use is the project width.
|
||||||
// as the toolbar's with can extend past this.
|
// as the toolbar's with can extend past this.
|
||||||
@@ -558,7 +552,6 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
desiredHost = mHost->GetBestSize();
|
desiredHost = mHost->GetBestSize();
|
||||||
desiredInput = mInput->GetBestSize();
|
desiredInput = mInput->GetBestSize();
|
||||||
desiredOutput = mOutput->GetBestSize();
|
desiredOutput = mOutput->GetBestSize();
|
||||||
chanLabel = mChannelsLabel->GetBestSize();
|
|
||||||
desiredChannels = mInputChannels->GetBestSize();
|
desiredChannels = mInputChannels->GetBestSize();
|
||||||
|
|
||||||
// wxGtk has larger comboboxes than the other platforms. For DeviceToolBar this will cause
|
// wxGtk has larger comboboxes than the other platforms. For DeviceToolBar this will cause
|
||||||
@@ -568,7 +561,6 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
desiredInput.SetHeight(desiredHost.GetHeight());
|
desiredInput.SetHeight(desiredHost.GetHeight());
|
||||||
desiredOutput.SetHeight(desiredHost.GetHeight());
|
desiredOutput.SetHeight(desiredHost.GetHeight());
|
||||||
desiredChannels.SetHeight(desiredHost.GetHeight());
|
desiredChannels.SetHeight(desiredHost.GetHeight());
|
||||||
chanLabel.SetHeight(desiredHost.GetHeight());
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ratioUnused = 0.98f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio);
|
ratioUnused = 0.98f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio);
|
||||||
@@ -578,16 +570,14 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
i++;
|
i++;
|
||||||
constrained = false;
|
constrained = false;
|
||||||
|
|
||||||
constrained = RepositionCombo(mHost, w, desiredHost, hostRatio, ratioUnused, 0, true) || constrained;
|
constrained = RepositionCombo(mHost, w, desiredHost, hostRatio, ratioUnused,
|
||||||
constrained = RepositionCombo(mInput, w, desiredInput, inputRatio, ratioUnused, mRecordBitmap->GetWidth(), true) || constrained;
|
0, true) || constrained;
|
||||||
constrained = RepositionCombo(mOutput, w, desiredOutput, outputRatio, ratioUnused, mPlayBitmap->GetWidth(), true) || constrained;
|
constrained = RepositionCombo(mInput, w, desiredInput, inputRatio, ratioUnused,
|
||||||
|
mRecordBitmap->GetWidth(), true) || constrained;
|
||||||
// the channels label belongs to the input channels combo so doesn't change any ratios.
|
constrained = RepositionCombo(mOutput, w, desiredOutput, outputRatio, ratioUnused,
|
||||||
// Always take the input channel combo's best width so that the combo has priority
|
mPlayBitmap->GetWidth(), true) || constrained;
|
||||||
constrained = RepositionCombo(mChannelsLabel, w, chanLabel, channelsRatio, ratioUnused,
|
|
||||||
mInputChannels->GetBestSize().GetX(), false) || constrained;
|
|
||||||
constrained = RepositionCombo(mInputChannels, w, desiredChannels, channelsRatio, ratioUnused,
|
constrained = RepositionCombo(mInputChannels, w, desiredChannels, channelsRatio, ratioUnused,
|
||||||
mChannelsLabel->GetSize().GetX(), true) || constrained;
|
0, true) || constrained;
|
||||||
}
|
}
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
@@ -687,10 +677,10 @@ void DeviceToolBar::FillInputChannels()
|
|||||||
wxString name;
|
wxString name;
|
||||||
|
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
name = _("1 (Mono)");
|
name = _("1 (Mono) Input Channel");
|
||||||
}
|
}
|
||||||
else if (j == 1) {
|
else if (j == 1) {
|
||||||
name = _("2 (Stereo)");
|
name = _("2 (Stereo) Input Channels");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
name = wxString::Format(wxT("%d"), j + 1);
|
name = wxString::Format(wxT("%d"), j + 1);
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ class DeviceToolBar:public ToolBar {
|
|||||||
|
|
||||||
wxBitmap *mPlayBitmap;
|
wxBitmap *mPlayBitmap;
|
||||||
wxBitmap *mRecordBitmap;
|
wxBitmap *mRecordBitmap;
|
||||||
wxStaticText *mChannelsLabel;
|
|
||||||
|
|
||||||
wxChoice *mInput;
|
wxChoice *mInput;
|
||||||
wxChoice *mOutput;
|
wxChoice *mOutput;
|
||||||
|
|||||||
Reference in New Issue
Block a user