Bug 1671 (part 2) - Clock icons do not propagate into Sync-locked MIDI / Spectrogram view tracks

This is the second half of the bug and it does MIDI.
This commit is contained in:
James Crook 2017-08-12 15:08:29 +01:00
parent 3d5a4e8a45
commit d0b49f1ec9
2 changed files with 15 additions and 0 deletions

View File

@ -58,8 +58,15 @@
//#define EXPERIMENTAL_DA
// Define this so that sync-lock tiles shine through spectrogram.
// The spectrogram pastes a bitmap over the tiles.
// This makes it use alpha blending, most transparent where least intense.
#define EXPERIMENTAL_SPECTROGRAM_OVERLAY
// Define this so that sync-lock tiles shine through note/MIDI track.
// The note track then relies on the same code for drawing background as
// Wavetrack, and draws its notes and lines over the top.
#define EXPERIMENTAL_NOTETRACK_OVERLAY
// EXPERIMENTAL_THEMING is mostly mainstream now.
// the define is still present to mark out old code before theming, that we might
// conceivably need.

View File

@ -2817,7 +2817,9 @@ void TrackArtist::DrawNoteBackground(const NoteTrack *track, wxDC &dc,
{
dc.SetBrush(wb);
dc.SetPen(wp);
#ifndef EXPERIMENTAL_NOTETRACK_OVERLAY
dc.DrawRectangle(sel); // fill rectangle with white keys background
#endif
int left = TIME_TO_X(track->GetOffset());
if (left < sel.x) left = sel.x; // clip on left
@ -2932,6 +2934,12 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track,
// we add the height of bottomNote from the position of pitch 0
track->PrepareIPitchToY(rect);
#ifdef EXPERIMENTAL_NOTETRACK_OVERLAY
DrawBackgroundWithSelection(&dc, rect, track,
AColor::labelSelectedBrush, AColor::labelUnselectedBrush,
selectedRegion, zoomInfo);
#endif
// Background comes in 4 colors, that are now themed.
// 214, 214,214 -- unselected white keys
// 192,192,192 -- black keys