1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-08 16:11:14 +02:00

Fix Linux: triple height Selection Toolbars

This commit is contained in:
James Crook 2017-07-29 17:21:33 +01:00
parent bc6d8d33dd
commit 6cb6652464
2 changed files with 32 additions and 0 deletions

View File

@ -338,6 +338,13 @@ void SelectionBar::Populate()
0, wxDefaultValidator, "");
mChoice->SetName(wxT("\a")); // stop Jaws screen reader using nearby text for name when name is empty
mChoice->SetSelection(0);
#ifdef __WXGTK__
// Combo boxes are taller on Linux, and if we don't do the following, the selection toolbar will
// be three units high.
wxSize sz = mChoice->GetBestSize();
sz.SetHeight( sz.y-4);
mChoice->SetMinSize( sz );
#endif
mainSizer->Add(mChoice, 0, wxALIGN_TOP | wxEXPAND | wxRIGHT, 6);
#endif
@ -398,12 +405,29 @@ void SelectionBar::Populate()
NULL,
this);
#ifdef __WXGTK__
// Combo boxes are taller on Linux, and if we don't do the following, the selection toolbar will
// be three units high.
wxSize sz = mRateBox->GetBestSize();
sz.SetHeight( sz.y-4);
mRateBox->SetMinSize( sz );
#endif
mainSizer->Add(mRateBox, 0, wxALIGN_TOP | wxRIGHT, 5);
AddVLine( mainSizer );
mSnapTo = safenew wxChoice(this, SnapToID,
wxDefaultPosition, wxDefaultSize,
SnapManager::GetSnapLabels());
#ifdef __WXGTK__
// Combo boxes are taller on Linux, and if we don't do the following, the selection toolbar will
// be three units high.
sz = mSnapTo->GetBestSize();
sz.SetHeight( sz.y-4);
mSnapTo->SetMinSize( sz );
#endif
mainSizer->Add(mSnapTo,
0, wxALIGN_TOP | wxRIGHT, 5);
mSnapTo->SetName(_("Snap To"));

View File

@ -147,6 +147,14 @@ void SpectralSelectionBar::Populate()
(this, OnChoiceID, wxDefaultPosition, wxDefaultSize, 2, choices,
0, wxDefaultValidator, _("Spectral Selection"));
mChoice->SetSelection(mbCenterAndWidth ? 0 : 1);
#ifdef __WXGTK__
// Combo boxes are taller on Linux, and if we don't do the following, the selection toolbar will
// be three units high.
wxSize sz = mChoice->GetBestSize();
sz.SetHeight( sz.y-4);
mChoice->SetMinSize( sz );
#endif
mainSizer->Add(mChoice, 0, wxALIGN_TOP | wxEXPAND |wxRIGHT, 6);
//