1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-12 15:46:25 +01:00

Improve comments surrounding my recent slider checkin.

This commit is contained in:
BusinessmanProgrammerSteve
2010-09-04 18:21:23 +00:00
parent bf874133a0
commit f86dca89fc
2 changed files with 8 additions and 6 deletions

View File

@@ -600,6 +600,11 @@ void LWSlider::Draw()
// //
// Get the thumb slider bitmap // Get the thumb slider bitmap
// //
// AD: Setting the mThumbBitmap pointer requires caution, because
// ownership of the object pointed to varies. If we've allocated
// mThumbBitmap we must delete it first, and we must set
// mThumbBitmapAllocated according to whether we have.
//
if (mEnabled && mOrientation == wxHORIZONTAL) if (mEnabled && mOrientation == wxHORIZONTAL)
{ {
@@ -645,9 +650,6 @@ void LWSlider::Draw()
new wxMask(wxBitmap(SliderThumb_VerticalAlpha), *wxBLACK)); new wxMask(wxBitmap(SliderThumb_VerticalAlpha), *wxBLACK));
} }
// mThumbBitmap = new wxBitmap( SliderThumb );
// mThumbBitmap->SetMask( new wxMask( wxBitmap( SliderThumbAlpha ), *wxBLACK ) );
// //
// Now the background bitmap // Now the background bitmap
// //

View File

@@ -213,9 +213,9 @@ class LWSlider
wxBitmap *mBitmap; wxBitmap *mBitmap;
wxBitmap *mThumbBitmap; wxBitmap *mThumbBitmap;
// True if this object owns *mThumbBitmap (sometimes mThumbBitmap points to // AD: True if this object owns *mThumbBitmap (sometimes mThumbBitmap points
// an object we shouldn't delete) -- once we get theming totally right this // to an object we shouldn't delete) -- once we get theming totally right
// should go away // this should go away
bool mThumbBitmapAllocated; bool mThumbBitmapAllocated;
wxString mName; wxString mName;