mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-28 15:38:48 +01:00
Tweak Theming. Reticules, Down buttons; Selected buttons.
This commit is contained in:
@@ -744,7 +744,9 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
|
||||
// Draw the line along which the thumb moves.
|
||||
//AColor::Light(&dc, false);
|
||||
AColor::UseThemeColour( &dc, clrTrackPanelText );
|
||||
//AColor::UseThemeColour( &dc, clrTrackPanelText );
|
||||
//AColor::Dark(&dc, false);
|
||||
AColor::UseThemeColour(&dc, clrSliderMain );
|
||||
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
{
|
||||
@@ -776,7 +778,7 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
dc.SetTextBackground( theTheme.Colour( clrTrackInfo ) );
|
||||
dc.SetBackground( theTheme.Colour( clrTrackInfo ) );
|
||||
// HAVE to use solid and not transparent here,
|
||||
// otherwise windows will do it's clever font optimisation trick,
|
||||
// otherwise windows will do its clever font optimisation trick,
|
||||
// but against a default colour of white, which is not OK on a dark
|
||||
// background.
|
||||
dc.SetBackgroundMode( wxSOLID );
|
||||
@@ -795,8 +797,7 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
{
|
||||
// draw the '-' and the '+'
|
||||
#ifdef EXPERIMENTAL_THEMING
|
||||
wxPen pen( theTheme.Colour( clrTrackPanelText ));
|
||||
dc.SetPen( pen );
|
||||
AColor::UseThemeColour(&dc, clrTrackPanelText );
|
||||
#else
|
||||
dc.SetPen(mEnabled ? *wxBLACK : wxColour(128, 128, 128));
|
||||
#endif
|
||||
@@ -821,6 +822,10 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
}
|
||||
}
|
||||
|
||||
// Use special colour to indicate no ticks.
|
||||
wxColour TickColour = theTheme.Colour( clrSliderLight );
|
||||
bool bTicks = TickColour != wxColour(60,60,60);
|
||||
|
||||
//v 20090820: Ruler doesn't align with slider correctly -- yet.
|
||||
//if ((mOrientation == wxVERTICAL) && (mStyle == DB_SLIDER))
|
||||
//{
|
||||
@@ -849,7 +854,7 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
// mpRuler->Draw(*dc);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
if( bTicks ) {
|
||||
// tick marks
|
||||
int divs = 10;
|
||||
double upp;
|
||||
@@ -873,7 +878,8 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
{
|
||||
int_d = (int)d;
|
||||
int tickLength = ((int_d == 0) || (int_d == divs)) ? 5: 3; // longer ticks at extremes
|
||||
AColor::Light(&dc, false);
|
||||
AColor::UseThemeColour(&dc, clrSliderLight );
|
||||
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
{
|
||||
AColor::Line(dc, mLeftX+p, mCenterY-tickLength, mLeftX+p, mCenterY-1); // ticks above
|
||||
@@ -882,8 +888,9 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
{
|
||||
AColor::Line(dc, mCenterX-tickLength, mTopY+p, mCenterX-1, mTopY+p); // ticks at left
|
||||
}
|
||||
#if 0
|
||||
AColor::Dark(&dc, false);
|
||||
|
||||
// AColor::Dark(&dc, false);
|
||||
AColor::UseThemeColour(&dc, clrSliderDark );
|
||||
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
{
|
||||
@@ -893,7 +900,6 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
{
|
||||
AColor::Line(dc, mCenterX-tickLength+1, mTopY+p+1, mCenterX-1, mTopY+p+1); // ticks at left
|
||||
}
|
||||
#endif
|
||||
}
|
||||
d += upp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user