1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-17 16:50:26 +02:00

bug 1415 Display device toolbar on Linux Xfce

Please check on other platforms, including re-launching with
floating toolbars.
This commit is contained in:
Steve Daulton 2016-07-03 23:43:08 +01:00
parent 757af1c33e
commit 4c019a2b03
2 changed files with 6 additions and 6 deletions

View File

@ -462,10 +462,8 @@ void DeviceToolBar::RepositionCombos()
desiredChannels.x = mInputChannels->GetBestSize().x;
desiredChannels.y = mInputChannels->GetSize().y;
// 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);
desiredHost.SetHeight(mHost->GetBestSize().y);
desiredInput.SetHeight(desiredHost.GetHeight());
desiredOutput.SetHeight(desiredHost.GetHeight());
desiredChannels.SetHeight(desiredHost.GetHeight());

View File

@ -119,6 +119,7 @@ ToolFrame::ToolFrame
// Transfer the bar to the ferry
bar->Reparent(this);
SetMinSize(bar->GetDockedSize());
{
// We use a sizer to maintain proper spacing
@ -764,8 +765,6 @@ void ToolManager::ReadConfig()
{
// Create the bar (with the top dock being temporary parent)
bar->Create( mTopDock );
// Construct a NEW floater
ToolFrame *f = safenew ToolFrame( mParent, this, bar, wxPoint( x, y ) );
@ -781,6 +780,10 @@ void ToolManager::ReadConfig()
bar->SetPositioned();
}
// Required on Linux Xfce
wxSize msz(width[ndx],height[ndx]-1);
bar->GetParent()->SetMinSize(msz);
// Inform toolbar of change
bar->SetDocked( NULL, false );
@ -1160,7 +1163,6 @@ void ToolManager::OnMouse( wxMouseEvent & event )
}
else
{
const auto &box = mLeft->GetBox();
p.x = dr.GetLeft() + r.GetLeft();
p.y = dr.GetTop() + r.GetTop() +
( ( r.GetHeight() - mLeft->GetBox().GetHeight() ) / 2 );