1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 14:50:06 +02:00

make DeviceToolBar's toolbar grid height same (small) for linux as mac/win (was large/double size)

This commit is contained in:
mchinen 2011-01-29 15:05:33 +00:00
parent a1bac3664f
commit df27456f83

View File

@ -301,8 +301,8 @@ void DeviceToolBar::Populate()
mChannelsLabel = new wxStaticText(this, wxID_ANY, _(" Rec Channels:"),
wxDefaultPosition, wxDefaultSize,
wxALIGN_RIGHT);
wxDefaultPosition, wxDefaultSize,
wxALIGN_RIGHT);
Add(mChannelsLabel, 0, wxALIGN_CENTER);
mInputChannels = new wxChoice(this,
@ -561,6 +561,16 @@ void DeviceToolBar::RepositionCombos()
chanLabel = mChannelsLabel->GetBestSize();
desiredChannels = mInputChannels->GetBestSize();
// wxGtk has larger comboboxes than the other platforms. For DeviceToolBar this will cause
// the height to be double because of the discrete grid layout. So we shrink it to prevent this.
#ifdef __WXGTK__
desiredHost.SetHeight(desiredHost.GetHeight() -4);
desiredInput.SetHeight(desiredHost.GetHeight());
desiredOutput.SetHeight(desiredHost.GetHeight());
desiredChannels.SetHeight(desiredHost.GetHeight());
chanLabel.SetHeight(desiredHost.GetHeight());
#endif
ratioUnused = 0.98f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio);
int i = 0;
// limit the amount of times we solve contraints to 5