-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix microtuning warning from widening instruments #7805
base: master
Are you sure you want to change the base?
Conversation
I tested the PR and it works and the code is correct.
That's right for now, but with #7201 going to master (hopefully soon), many Lv2 instruments can be resized larger than 250px - if we allow Lv2 UI to be displayed inside the InstrumentTrackWindow (vs in a new popup window). If "instrument windows [...] have their width determined by the instrument itself" (quoting you from Discord, btw this is the same solution I proposed in #7524 which I withdrew in favor of #3532), this PR might be restricting the size unwanted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR solves this problem the same way it was solved in d447cb0: the text has received a fixed maximum width. This is a bit of a hack, but there are no instruments that are or can be resized to larger than 250px that are MIDI-based. A cleaner possible solution would be to refactor things so the other tabs have their width determined by the instrument size, but this works for now.
Maybe we can explain some of this in a TODO comment, but LGTM overall
Hmmm, in the images you shared I am still seeing ~3px of extra space on the right that shouldn't be there. It's much less noticeable than the previous gap, but it looks like the problem isn't fully solved. It may be that the problem is better or worse for any given user depending on the system UI font, which explains why I don't see that gap on my machine. I'll take a closer look. Edit: Sanity check, I cannot replicate this on 1.2.2 stable, nor the current 1.3.0-alpha, so whatever is causing it happened since then. |
Resolves #7798.
The culprit was the little text warning under the instrument tuning view informing the user that MIDI-based instruments do not support the microtuner. The entire instrument window was expanding horizontally to accommodate this. The "fixed size" of the instrument itself has no bearing on the other tabs in the instrument window, it seems.
This PR solves this problem the same way it was solved in d447cb0: the text has received a fixed maximum width. This is a bit of a hack, but there are no instruments that are or can be resized to larger than 250px that are MIDI-based. A cleaner possible solution would be to refactor things so the other tabs have their width determined by the instrument size, but this works for now.