X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..67b81440f079f88e6202a199fd5763af73bbac0f:/src/gtk/brush.cpp diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index 2f945402ce..ca0987080c 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -65,9 +65,16 @@ wxBrush::wxBrush( const wxColour &colour, int style ) wxBrush::wxBrush( const wxBitmap &stippleBitmap ) { m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = wxSTIPPLE; M_BRUSHDATA->m_colour = *wxBLACK; M_BRUSHDATA->m_stipple = stippleBitmap; + if (M_BRUSHDATA->m_stipple.GetMask()) + { + M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE; + } + else + { + M_BRUSHDATA->m_style = wxSTIPPLE; + } if (wxTheBrushList) wxTheBrushList->AddBrush( this ); } @@ -161,6 +168,14 @@ void wxBrush::SetStipple( const wxBitmap& stipple ) { Unshare(); M_BRUSHDATA->m_stipple = stipple; + if (M_BRUSHDATA->m_stipple.GetMask()) + { + M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE; + } + else + { + M_BRUSHDATA->m_style = wxSTIPPLE; + } } void wxBrush::Unshare()