Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outer border for melody clips is drawn one pixel too much to the right and bottom #5593

Closed
claell opened this issue Jul 21, 2020 · 4 comments · Fixed by #5594
Closed

Outer border for melody clips is drawn one pixel too much to the right and bottom #5593

claell opened this issue Jul 21, 2020 · 4 comments · Fixed by #5594

Comments

@claell
Copy link
Contributor

claell commented Jul 21, 2020

The melody pattern appears a little bit off (on the right side) compared to the rest.

image

Originally posted by @russiankumar in #5573 (comment)

Creating this issue to keep track of this bug.

@claell claell changed the title Melody clip is drawn one pixel too much to the right Inner border for melody clips is drawn one pixel to the left of where it should be Jul 21, 2020
@claell
Copy link
Contributor Author

claell commented Jul 21, 2020

I finally tracked this down now: https://github.com/LMMS/lmms/blob/master/src/tracks/Pattern.cpp#L1126

Apparently each TCO class (instrument, sample track, beat and bassline and automation track) implement their own function for this. There is alot of overlapping functionality, so that should probably be improved in the future.

The current problem could be simply be solved by adjusting the relevant part of the paint function to behave like the one for the rest of the TCOs.

@Spekular
Copy link
Member

Spekular commented Jul 21, 2020

Looks like the original title was correct though, the outer border is drawn too far right rather than the inner border being drawn too far left. Not only that, but it also appears to be drawn too far down on the bottom. Here's the screenshot from the OP cropped further and scaled up without interpolation, for easier viewing.
image

@claell claell changed the title Inner border for melody clips is drawn one pixel to the left of where it should be Outer border for melody clips is drawn one pixel too much to the right and bottom Jul 21, 2020
@claell
Copy link
Contributor Author

claell commented Jul 21, 2020

Jup, I changed the title based on your comment in the other issue. Now I adjusted it again based on your observations. The scaled screenshot you attached shows that pretty nicely.

See the linked PR I just created. It should fix the problem.

@ryuukumar
Copy link
Member

There is alot of overlapping functionality, so that should probably be improved in the future.

Again, a suggestion for #5592.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants