mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 22:28:57 +02:00
Add theming for NoteTrack
This commit is contained in:
parent
354b17394f
commit
1114d5fa20
@ -487,7 +487,7 @@ void TrackArtist::DrawTrack(const Track * t,
|
|||||||
!(!wt->GetLinked() && wt->GetLink())) {
|
!(!wt->GetLinked() && wt->GetLink())) {
|
||||||
wxFont labelFont(12, wxSWISS, wxNORMAL, wxNORMAL);
|
wxFont labelFont(12, wxSWISS, wxNORMAL, wxNORMAL);
|
||||||
dc.SetFont(labelFont);
|
dc.SetFont(labelFont);
|
||||||
dc.SetTextForeground(wxColour(255, 255, 0));
|
dc.SetTextForeground(theTheme.Colour( clrTrackNameText ));
|
||||||
dc.DrawText (wt->GetName(), rect.x+10, rect.y); // move right 10 pixels to avoid overwriting <- symbol
|
dc.DrawText (wt->GetName(), rect.x+10, rect.y); // move right 10 pixels to avoid overwriting <- symbol
|
||||||
}
|
}
|
||||||
break; // case Wave
|
break; // case Wave
|
||||||
@ -2840,19 +2840,18 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track,
|
|||||||
// we add the height of bottomNote from the position of pitch 0
|
// we add the height of bottomNote from the position of pitch 0
|
||||||
track->PrepareIPitchToY(rect);
|
track->PrepareIPitchToY(rect);
|
||||||
|
|
||||||
// Background comes in 6 colors:
|
// Background comes in 4 colors, that are now themed.
|
||||||
// 214, 214,214 -- unselected white keys
|
// 214, 214,214 -- unselected white keys
|
||||||
// 192,192,192 -- unselected black keys
|
// 192,192,192 -- black keys
|
||||||
// 170,170,170 -- unselected bar lines
|
// 170,170,170 -- bar lines
|
||||||
// 165,165,190 -- selected white keys
|
// 165,165,190 -- selected white keys
|
||||||
// 148,148,170 -- selected black keys
|
|
||||||
// 131,131,150 -- selected bar lines
|
|
||||||
wxPen blackStripePen;
|
wxPen blackStripePen;
|
||||||
blackStripePen.SetColour(192, 192, 192);
|
blackStripePen.SetColour(theTheme.Colour( clrMidiZebra));
|
||||||
wxBrush blackStripeBrush;
|
wxBrush blackStripeBrush;
|
||||||
blackStripeBrush.SetColour(192, 192, 192);
|
blackStripeBrush.SetColour(theTheme.Colour( clrMidiZebra));
|
||||||
wxPen barLinePen;
|
wxPen barLinePen;
|
||||||
barLinePen.SetColour(170, 170, 170);
|
barLinePen.SetColour(theTheme.Colour( clrMidiLines));
|
||||||
|
|
||||||
DrawNoteBackground(track, dc, rect, rect, zoomInfo, blankBrush, blankPen,
|
DrawNoteBackground(track, dc, rect, rect, zoomInfo, blankBrush, blankPen,
|
||||||
blackStripeBrush, blackStripePen, barLinePen);
|
blackStripeBrush, blackStripePen, barLinePen);
|
||||||
@ -2873,14 +2872,14 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track,
|
|||||||
dc.SetPen(selectedWhiteKeyPen);
|
dc.SetPen(selectedWhiteKeyPen);
|
||||||
|
|
||||||
wxBrush selectedWhiteKeyBrush;
|
wxBrush selectedWhiteKeyBrush;
|
||||||
selectedWhiteKeyBrush.SetColour(165, 165, 190);
|
selectedWhiteKeyBrush.SetColour(theTheme.Colour( clrSelected ));
|
||||||
// Then, the black keys and octave stripes, as smaller rectangles
|
// Then, the black keys and octave stripes, as smaller rectangles
|
||||||
wxPen selectedBlackKeyPen;
|
wxPen selectedBlackKeyPen;
|
||||||
selectedBlackKeyPen.SetColour(148, 148, 170);
|
selectedBlackKeyPen.SetColour(theTheme.Colour( clrMidiZebra));
|
||||||
wxBrush selectedBlackKeyBrush;
|
wxBrush selectedBlackKeyBrush;
|
||||||
selectedBlackKeyBrush.SetColour(148, 148, 170);
|
selectedBlackKeyBrush.SetColour(theTheme.Colour( clrMidiZebra));
|
||||||
wxPen selectedBarLinePen;
|
wxPen selectedBarLinePen;
|
||||||
selectedBarLinePen.SetColour(131, 131, 150);
|
selectedBarLinePen.SetColour(theTheme.Colour( clrMidiLines));
|
||||||
|
|
||||||
DrawNoteBackground(track, dc, rect, selBG, zoomInfo,
|
DrawNoteBackground(track, dc, rect, selBG, zoomInfo,
|
||||||
selectedWhiteKeyBrush, selectedWhiteKeyPen,
|
selectedWhiteKeyBrush, selectedWhiteKeyPen,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user