1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

Bug 2410 - Mac: Cosmetic issues with undocked resizable toolbars in Dark and High Contrast themes

This commit is contained in:
Leland Lucius
2020-05-28 23:10:48 -05:00
parent 8ae8e0f0a5
commit 5cf8434b06

View File

@@ -86,23 +86,7 @@ ToolFrame::ToolFrame
, mParent{ parent } , mParent{ parent }
{ {
int width = bar->GetSize().x; int width = bar->GetSize().x;
int border; int border = 1;
// OSX doesn't need a border, but Windows and Linux do
border = 1;
#if defined(__WXMAC__)
border = 0;
// WXMAC doesn't support wxFRAME_FLOAT_ON_PARENT, so we do
//
// LL: I've commented this out because if you have, for instance, the meter
// toolbar undocked and large and then you open a dialog like an effect,
// the dialog may appear behind the dialog and you can't move either one.
//
// However, I'm leaving it here because I don't remember why I'd included
// it in the first place.
// SetWindowClass((WindowRef)d.MacGetWindowRef(), kFloatingWindowClass);
#endif
// Save parameters // Save parameters
mManager = manager; mManager = manager;
@@ -192,14 +176,11 @@ void ToolFrame::OnPaint( wxPaintEvent & WXUNUSED(event) )
wxSize sz = GetSize(); wxSize sz = GetSize();
wxRect r; wxRect r;
dc.SetPen( theTheme.Colour( clrTrackPanelText) ); dc.SetPen( theTheme.Colour( clrTrackPanelText ) );
#if !defined(__WXMAC__) dc.SetBackground( wxBrush( theTheme.Colour( clrMedium ) ) );
wxBrush clearer( theTheme.Colour( clrMedium ));
dc.SetBackground( clearer );
dc.Clear(); dc.Clear();
dc.SetBrush( *wxTRANSPARENT_BRUSH ); dc.SetBrush( *wxTRANSPARENT_BRUSH );
dc.DrawRectangle( 0, 0, sz.GetWidth(), sz.GetHeight() ); dc.DrawRectangle( 0, 0, sz.GetWidth(), sz.GetHeight() );
#endif
if( mBar && mBar->IsResizable() ) if( mBar && mBar->IsResizable() )
{ {