Fix coarse gridlines being half as wide every 8 bars. #7610
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially fixes #7305
This fixes the issue that every 8th bar line was half as wide. This was due to an off-by-one error where the very last bar line is not drawn. This works fine when the coarse grid lines are 1px wide, but in the default theme it is 2px, so the thinness every 8 bars is quite noticeable. This is fixed by changing
<
to<=
in the loop condition.Before:
![Screenshot From 2024-11-30 12-50-10](https://private-user-images.githubusercontent.com/117475203/391263629-8b6c10f5-a37b-45ee-a5ea-ab006a8ec606.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDkzMDksIm5iZiI6MTczODkwOTAwOSwicGF0aCI6Ii8xMTc0NzUyMDMvMzkxMjYzNjI5LThiNmMxMGY1LWEzN2ItNDVlZS1hNWVhLWFiMDA2YThlYzYwNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QwNjE2NDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MzZiNmViZjAxNzc1N2YzYzJkYjRhOTQwODA4ZDgwNGNkNDkyYzA5MjNjOTUxZGJiYjdkOGQ5M2ZjMjFlNDllJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ojJJyjuajhNAr8Z77iCOz6WlpzSCF-ATAYXZmrTJbjo)
After:
![Screenshot From 2024-11-30 13-17-59](https://private-user-images.githubusercontent.com/117475203/391263680-f2361051-a4e3-48e5-8b53-7a443bd1e496.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDkzMDksIm5iZiI6MTczODkwOTAwOSwicGF0aCI6Ii8xMTc0NzUyMDMvMzkxMjYzNjgwLWYyMzYxMDUxLWE0ZTMtNDhlNS04YjUzLTdhNDQzYmQxZTQ5Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QwNjE2NDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYTFlNGRkNTZjYTFiODRmNTI5ZTc2M2IwOGFkZDE4ZmVmMTZhNmYxZjM2ZTgzM2EzNzRjOTc3NDJlZDMzMmU0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.H-hSfDBdCMqijicoCvBD3ewaoPdltQSHC2iXJxIZnx8)
Note
This does not address the original issue's point that the grid lines are too thick. This simply makes them all uniform. However, the thickness can be changed in the theme style.css.
Also, I do have a fear that since floats are used in the loop, that simply changing
<
to<=
may not fully solve the issue. In my tested, it appears to have solved it, but I don't know.