mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-11 15:16:27 +01:00
Fix midi channel toggling
This reintroduces the buttons to toggle display of individual midi channels, and cleans up the code behind that feature. This functionality has actually been present in production versions of audacity for a while, at least for clicking. However, the buttons themselves were not drawn, making it exteremly painful (but possible) to use. As requested by PRL, this is always enabled if USE_MIDI is defined.
This commit is contained in:
@@ -114,7 +114,6 @@ private:
|
||||
// Draw the minimize button *and* the sync-lock track icon, if necessary.
|
||||
void DrawMinimize(wxDC * dc, const wxRect & rect, Track * t, bool down) const;
|
||||
|
||||
void GetTrackControlsRect(const wxRect & rect, wxRect &dest) const;
|
||||
void GetCloseBoxRect(const wxRect & rect, wxRect &dest) const;
|
||||
void GetTitleBarRect(const wxRect & rect, wxRect &dest) const;
|
||||
void GetMuteSoloRect(const wxRect & rect, wxRect &dest, bool solo, bool bHasSoloButton,
|
||||
@@ -126,6 +125,9 @@ private:
|
||||
#endif
|
||||
void GetMinimizeRect(const wxRect & rect, wxRect &dest) const;
|
||||
void GetSyncLockIconRect(const wxRect & rect, wxRect &dest) const;
|
||||
#ifdef USE_MIDI
|
||||
void GetMidiControlsRect(const wxRect & rect, wxRect &dest) const;
|
||||
#endif
|
||||
|
||||
public:
|
||||
LWSlider * GainSlider(WaveTrack *t, bool captured = false) const;
|
||||
@@ -881,6 +883,13 @@ enum : int {
|
||||
kTrackInfoBtnSize = 18 // widely used dimension, usually height
|
||||
};
|
||||
|
||||
#ifdef USE_MIDI
|
||||
enum : int {
|
||||
kMidiCellWidth = (kTrackInfoWidth / 4) - 2,
|
||||
kMidiCellHeight = kTrackInfoBtnSize
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user