From df27456f83b5b717f5f376223670fe87a267ad5c Mon Sep 17 00:00:00 2001 From: mchinen Date: Sat, 29 Jan 2011 15:05:33 +0000 Subject: [PATCH] make DeviceToolBar's toolbar grid height same (small) for linux as mac/win (was large/double size) --- src/toolbars/DeviceToolBar.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index 5c6fda602..36dc5d84f 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -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