1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 22:28:57 +02:00

Rotate pip on vertical slider.

This commit is contained in:
James Crook 2017-04-24 23:06:15 +01:00
parent 621f01abb0
commit 93b5456c08

View File

@ -629,7 +629,8 @@ void LWSlider::OnPaint(wxDC &dc)
}
else
{
dc.DrawBitmap(*mThumbBitmap, mLeft+thumbOrtho, mTop+thumbPos, true);
// TODO: Don't use pixel-count hack in positioning.
dc.DrawBitmap(*mThumbBitmap, mLeft+thumbOrtho-5, mTop+thumbPos, true);
}
if (mTipPanel)
@ -653,8 +654,16 @@ void LWSlider::Draw(wxDC & paintDC)
// Set up the memory DC
wxMemoryDC dc;
if (mOrientation == wxVERTICAL){
wxImage img(theTheme.Bitmap( bmpSliderThumb ).ConvertToImage() );
wxImage img2 = img.Rotate90(false);
mThumbBitmap = std::make_unique<wxBitmap>(wxBitmap( img2));
}
else
mThumbBitmap = std::make_unique<wxBitmap>(wxBitmap( theTheme.Bitmap( bmpSliderThumb )));
// This code draws the (old) slider thumb.
#if 0
// Create the bitmap