]> git.saurik.com Git - wxWidgets.git/commitdiff
Use mask when drawing bitmaps in generic wxDataViewCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 Sep 2013 15:25:52 +0000 (15:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 Sep 2013 15:25:52 +0000 (15:25 +0000)
This allows to have bitmaps with transparent areas in them.

Closes #15510.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/generic/datavgen.cpp

index 865271b1e8f195b3626f018f1d6bf85b4ec953ed..1391d17ec7bb3125fb20e20960059c436b0ae615 100644 (file)
@@ -577,6 +577,7 @@ All (GUI):
 - wxRTC: extracted XML utilities into a separate class for potential reuse.
 - wxPropertyGrid: improve composite flags handling (Jens Lody).
 - Don't crash laying out wxGridBagSizer with only hidden elements (briceandre).
+- Fix alignment and transparency of bitmaps in wxDataViewCtrl (Eric Jensen).
 
 wxGTK:
 
index d90cd83ef0fc81b2938042ef49e3d0b0f15e2172..d5c0614e608226d0c319859b9a7eb2c1c56046e1 100644 (file)
@@ -1021,7 +1021,7 @@ bool wxDataViewBitmapRenderer::GetValue( wxVariant& WXUNUSED(value) ) const
 bool wxDataViewBitmapRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state) )
 {
     if (m_bitmap.IsOk())
-        dc->DrawBitmap( m_bitmap, cell.x, cell.y );
+        dc->DrawBitmap( m_bitmap, cell.x, cell.y, true /* use mask */ );
     else if (m_icon.IsOk())
         dc->DrawIcon( m_icon, cell.x, cell.y );