Changed bar lines to follow snap size
Overview Vertical lines now appear or disappear depending on quantization value.
Vertical lines between bars are 1 pixel wide with no emboss. Vertical lines at the end of bars are now 2 pixels wide with 1 pixel emboss to make them stand out. (MIN_PIXELS_PER_BAR has been increased from 2 to 4 to compensate.)
To account for small quantization values, vertical lines between bars will automatically disappear as the user zooms out. (Vertical lines at the end of bars will not disappear.)
Screenshots
2 bar quantization (big lines appear every other bar)
1/2 bar quantization (big lines appear every bar, one small line appears within each bar)
1/16 bar quantization (big lines appear every bar, 15 small lines appear within each bar)
Good job. Nice to have this feature implemented but it would help if you could change the defaults too acc to #6420. IMO, 1/16 should be the default snapping with a bit of zoom in. That's what most daws follow these days.
Alright, I'll do that.
Changed the colors a bit to make the coarse grid stand out more. The coarse grid, fine grid, and horizontal line colors can all be individually configured as QSS properties. The line widths are defined as constants in TrackContentWidget.cpp.
The coarse grid width, fine grid width, emboss width, and horizontal line width are all configurable now as QSS properties, as well as the offset of the emboss. The default themes have been updated accordingly.
This does break backwards compatibility with old 1.2 themes, but I assumed that that was going to happen sooner or later with 1.3.
Requesting review from @michaelgregorius
Hi @BoredGuy1,
thanks for your PR! I really like that the Song Editor now defaults to a more zoomed in view!
I'd like to propose to use a default quantization of 1/4 for the Song Editor though because it makes it look less "busy". It would also coincide with the tempo which is BPM, i.e. 1/4 notes per minute.
Heres a visual comparison of the two options:
Using 1/4 is also the default in REAPER to compare against another DAW:
Hey @michaelgregorius, thanks for the review. And sorry for the late response (been busy).
I agree, default 1/4 definitely looks cleaner than 1/16. That should be an easy change. I think I'll be able to add that (along with all the requested changes) in the coming week.
OK, everything should be good now.
Ready for review again.
Ready for review again.
Still looks good to me. @DomClark, @zonkmachine and @Rossmaxx: Is it also good for you? There only seem to be resolved comments now.
Yeah it's fine with me. Tbh 1/16 was too cluttered to begin with. Thanks to Michael to suggest the 1/4 snapping. I didn't know that 1/4 was supposed to be better.
LGTM
Pull request #7271 fixes some performance problems that got introduced by this pull request due to missing initialization of some variables.