[Git][wxwidgets/wxwidgets][master] OSX transparent controls background (#26090)

3 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jan 11, 2026, 4:09:59 AMJan 11
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 8ada351a
    by Stefan Csomor at 2026-01-11T09:53:25+01:00
    OSX transparent controls background (#26090)
    
    set transparent background on certain native controls, otherwise the background color is incorrect, see #26088 , also visible in nested groupboxes
    
    using generic approach as per Vadim’s suggestion

2 changed files:

Changes:

  • src/osx/checkbox_osx.cpp
    ... ... @@ -34,8 +34,8 @@ bool wxCheckBox::Create(wxWindow *parent,
    34 34
         m_labelOrig = m_label = label ;
    
    35 35
     
    
    36 36
         WXValidateStyle( &style );
    
    37
    -    SetPeer(wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
    
    38 37
     
    
    38
    +    SetPeer(wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
    
    39 39
         MacPostControlCreate(pos, size) ;
    
    40 40
     
    
    41 41
         return true;
    

  • src/osx/window_osx.cpp
    ... ... @@ -399,6 +399,8 @@ bool wxWindowMac::Create(wxWindowMac *parent,
    399 399
     
    
    400 400
         m_hScrollBarAlwaysShown =
    
    401 401
         m_vScrollBarAlwaysShown = HasFlag(wxALWAYS_SHOW_SB);
    
    402
    +    if ( HasTransparentBackground())
    
    403
    +        m_backgroundStyle = wxBG_STYLE_TRANSPARENT;
    
    402 404
     
    
    403 405
         if ( m_peer != kOSXNoWidgetImpl )
    
    404 406
         {
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/8ada351adf57a4d8240102fe2160b737d264d318 at 1768122597

Reply all
Reply to author
Forward
0 new messages