Skip to content

Commit

Permalink
Changed bar lines to follow snap size (#7034)
Browse files Browse the repository at this point in the history
* Added lines in between bars
* Changed bar lines to follow snap size
* Changed default zoom and quantization value
* Added constants for line widths
* Added QSS configuration for new grid line colors
* Tied line widths to QSS properties
* Changed default quantization to 1/4
* Removed clear() from destructor model
* Removed destructor in ComboBoxModel.h
* Changed member set/get functions to pass by value
* Updated signal connection with newer syntax
  • Loading branch information
BoredGuy1 authored and tresf committed Feb 23, 2025
1 parent 5471ab1 commit e028d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/TrackContainerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ public slots:
protected:
static const int DEFAULT_PIXELS_PER_BAR = 128;

void resizeEvent( QResizeEvent * ) override;

TimePos m_currentPosition;


Expand Down
2 changes: 1 addition & 1 deletion src/gui/tracks/TrackContentWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void TrackContentWidget::updateBackground()

// draw coarse grid
pmp.setPen( QPen( coarseGridColor(), coarseGridWidth() ) );
for (float x = 0; x <= w * 2; x += ppb * coarseGridResolution)
for (float x = 0; x < w * 2; x += ppb * coarseGridResolution)
{
pmp.drawLine( QLineF( x, 0.0, x, h ) );
}
Expand Down

0 comments on commit e028d13

Please sign in to comment.