1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-19 17:40:15 +02:00

The vruler and sash draw functions treat their own left boundaries

This commit is contained in:
Paul Licameli 2018-11-02 19:28:48 -04:00
parent 0f17b309bc
commit 951e7d27da
3 changed files with 19 additions and 12 deletions

View File

@ -378,6 +378,13 @@ void TrackArtist::DrawVRuler
#endif
// Stroke the left border
dc->SetPen(*wxBLACK_PEN);
{
const auto left = rect_.GetLeft();
AColor::Line( *dc, left, rect_.GetTop(), left, rect_.GetBottom() );
}
// Label and Time tracks do not have a vruler
// But give it a beveled area
t->TypeSwitch(

View File

@ -1624,7 +1624,7 @@ void TrackPanel::DrawOutside
//}
int vrul = GetVRulerOffset();
DrawBordersAroundTrack(dc, rect, vrul);
DrawBordersAroundTrack( dc, rect );
{
auto channels = TrackList::Channels(t);
// omit last (perhaps, only) channel
@ -1694,6 +1694,14 @@ void TrackPanel::DrawSash( wxDC * dc, const wxRect & rect, int labelw )
// channel, down to and including the upper border of the next channel
ADCChanger cleanup{ dc };
// Stroke the left border
dc->SetPen(*wxBLACK_PEN);
{
const auto left = rect.GetLeft();
AColor::Line( *dc, left, rect.GetTop(), left, rect.GetBottom() );
}
AColor::TrackPanelBackground(dc, false);
wxRect rec{ rect };
@ -1905,11 +1913,8 @@ void TrackPanel::VerticalScroll( float fracPosition){
// Given rectangle excludes the insets left, right, and top
// Draw a rectangular border and also a vertical separator of track controls
// from the rest (ruler and proper track area)
void TrackPanel::DrawBordersAroundTrack(wxDC * dc,
const wxRect & rect,
const int vrul)
// Draw a rectangular border
void TrackPanel::DrawBordersAroundTrack( wxDC * dc, const wxRect & rect )
{
// Border around track and label area
// leaving room for the shadow
@ -1918,10 +1923,6 @@ void TrackPanel::DrawBordersAroundTrack(wxDC * dc,
dc->DrawRectangle(rect.x, rect.y,
rect.width - kShadowThickness,
rect.height - kShadowThickness);
// between vruler and TrackInfo
AColor::Line(*dc, vrul, rect.y, vrul, rect.y + rect.height - 1);
}
// Given rectangle has insets subtracted left, right, and top

View File

@ -376,8 +376,7 @@ protected:
void HighlightFocusedTrack (wxDC* dc, const wxRect &rect);
void DrawShadow ( wxDC* dc, const wxRect & rect );
void DrawBordersAroundTrack(wxDC* dc, const wxRect & rect,
const int vrul);
void DrawBordersAroundTrack(wxDC* dc, const wxRect & rect );
void DrawOutsideOfTrack (
TrackPanelDrawingContext &context, const wxRect & rect );
void DrawSash ( wxDC* dc, const wxRect & rect, int labelw );