From 78135d25fd66a57f32fe64e618f1893efc01b5f5 Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 3 May 2017 16:11:05 +0100 Subject: [PATCH] Use blue for negative Numbers The time ruler previously used blue for negative numbers, when scrolling left of zero was enabled. This was broken by adding the dark-theme code. Fixed now, and with a new configurable colour for it which defaults to blue if non provided. --- src/AColor.cpp | 9 --------- src/AllThemeResources.h | 3 ++- src/widgets/Ruler.cpp | 3 +-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/AColor.cpp b/src/AColor.cpp index c3a62d02f..6afdd6dcf 100644 --- a/src/AColor.cpp +++ b/src/AColor.cpp @@ -312,15 +312,6 @@ void AColor::Medium(wxDC * dc, bool selected) dc->SetPen(mediumPen[index]); } -#if 0 -#ifdef EXPERIMENTAL_THEMING - UseThemeColour( dc, selected ? clrMediumSelected : clrMedium); -#endif -#ifdef EXPERIMENTAL_THEMING - UseThemeColour( dc, selected ? clrLightSelected : clrLight); -#endif -#endif - void AColor::MediumTrackInfo(wxDC * dc, bool selected) { #ifdef EXPERIMENTAL_THEMING diff --git a/src/AllThemeResources.h b/src/AllThemeResources.h index 5df022361..1452949f2 100644 --- a/src/AllThemeResources.h +++ b/src/AllThemeResources.h @@ -369,7 +369,7 @@ from there. Audacity will look for a file called "Pause.png". DEFINE_COLOUR( clrTrackBackground, wxColour( 20, 20, 20), wxT("TrackBackground") ); - DEFINE_COLOUR( clrPlaceHolder1, wxColour( 255, 255, 20), wxT("Placeholder1") ); + DEFINE_COLOUR( clrPlaceHolder1, wxColour( 255, 255, 20), wxT("Placeholder1") ); DEFINE_COLOUR( clrGraphLabels, wxColour( 0, 0, 0), wxT("GraphLabels") ); DEFINE_COLOUR( clrSpectroBackground, wxColour( 255, 255, 20), wxT("SpectroBackground") ); DEFINE_COLOUR( clrScrubRuler, wxColour( 255, 255, 20), wxT("ScrubRuler") ); @@ -378,6 +378,7 @@ from there. Audacity will look for a file called "Pause.png". DEFINE_COLOUR( clrTrackNameText, wxColour( 255, 255, 20), wxT("TrackNameText") ); DEFINE_COLOUR( clrMidiZebra, wxColour( 255, 255, 20), wxT("MidiZebra") ); DEFINE_COLOUR( clrMidiLines, wxColour( 255, 255, 20), wxT("MidiLines") ); + DEFINE_COLOUR( clrTextNegativeNumbers, wxColour( 0, 0, 255), wxT("TextNegativeNumbers") ); DEFINE_COLOUR( clrSpectro1, wxColour( 191, 191, 191), wxT("Spectro1") ); DEFINE_COLOUR( clrSpectro2, wxColour( 76, 153, 255), wxT("Spectro2") ); diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index b596473d8..0f367082b 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1540,8 +1540,7 @@ void Ruler::Label::Draw(wxDC&dc, bool twoTone, wxColour c) const bool altColor = twoTone && value < 0.0; #ifdef EXPERIMENTAL_THEMING - // TODO: handle color distinction - dc.SetTextForeground(c); + dc.SetTextForeground(altColor ? theTheme.Colour( clrTextNegativeNumbers) : c); #else dc.SetTextForeground(altColor ? *wxBLUE : *wxBLACK); #endif