From d0b49f1ec90973510329c6a562957ed6bde2a203 Mon Sep 17 00:00:00 2001 From: James Crook Date: Sat, 12 Aug 2017 15:08:29 +0100 Subject: [PATCH] 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. --- src/Experimental.h | 7 +++++++ src/TrackArtist.cpp | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Experimental.h b/src/Experimental.h index db9f2d498..870748414 100644 --- a/src/Experimental.h +++ b/src/Experimental.h @@ -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. diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 37ba2f3ca..41a272948 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -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