Skip to content

Commit 6f96600

Browse files
authored
Merge pull request #6113 from BOINC/mac_fix_simple_view_buttons
Mac: Fix drawing of simple view buttons
2 parents 9c2c6e5 + 63e7462 commit 6f96600

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clientgui/sg_CustomControls.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,14 @@ CTransparentButton::CTransparentButton(wxWindow* parent, wxWindowID id, const wx
109109

110110
bool CTransparentButton::Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name )
111111
{
112+
#ifdef __WXMAC__
113+
SetBackgroundStyle(wxBG_STYLE_TRANSPARENT); // Must come before wxButton::Create()
114+
#endif
112115
bool bRetVal = wxButton::Create(parent, id, label, pos, size, style|wxTRANSPARENT_WINDOW, validator, name);
113116

117+
#ifndef __WXMAC__
114118
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
119+
#endif
115120
SetBackgroundColour(parent->GetBackgroundColour());
116121
SetForegroundColour(parent->GetForegroundColour());
117122

0 commit comments

Comments
 (0)