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

Variable tab widget #4906

Merged
merged 7 commits into from
Apr 22, 2019
Merged

Conversation

JohannesLorenz
Copy link
Contributor

This adds a boolean to the tab widget to specify whether it should be resizable. As a consequence, the Instrument Window will resize to fit its contents.

Make InstrumentTrackWindow as large as the InstrumentView requires
Previously, they had been resized by the fixed size parent tab widget. We need
to do this manually now.
- Fix the instrument window tabs minimum width and height formulae
- Also set minimum height and width for instrument tab
@JohannesLorenz
Copy link
Contributor Author

This may be the most difficult Lv2 sidebranch concerning regression (i.e. other ). It would be really cool if someone can review, otherwise I'll need to merge this without review in 7 days.

@JohannesLorenz JohannesLorenz added gui needs code review A functional code review is currently required for this PR needs style review A style review is currently required for this PR labels Apr 17, 2019
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished review and found only few coding convention issues otherwise code look good. 👍

Also tried the branch and noticed that the 'orange stripe' bug mentioned in #4899 is present here. I think it's the background that is repeating and the widget showing it is 1px to height.

src/gui/widgets/TabWidget.cpp Outdated Show resolved Hide resolved
src/gui/widgets/TabWidget.cpp Outdated Show resolved Hide resolved
src/gui/widgets/TabWidget.cpp Outdated Show resolved Hide resolved
src/gui/widgets/TabWidget.cpp Outdated Show resolved Hide resolved
src/gui/widgets/TabWidget.cpp Outdated Show resolved Hide resolved
src/tracks/InstrumentTrack.cpp Outdated Show resolved Hide resolved
@JohannesLorenz JohannesLorenz removed needs code review A functional code review is currently required for this PR needs style review A style review is currently required for this PR labels Apr 18, 2019
In the instrument plugin tab, there was an orange stripe for
TripleOscillator. This was because internally, TabWidget moves up the
widget by 1 (TabWidget.cpp, line 89).

The size of the whole window is:

```
widget->height() + m_tabbarHeight - 1
```

So this code adds an offset of "-1" to the necessary computations.
@JohannesLorenz
Copy link
Contributor Author

First of all, many thanks for the review!

I fixed everything, any stripes (like the orange one for 3osc) should be gone now.

I'll do a regular merge when you're OK.

@ghost
Copy link

ghost commented Apr 20, 2019

First of all, many thanks for the review!

I fixed everything, any stripes (like the orange one for 3osc) should be gone now.

I'll do a regular merge when you're OK.

Awesome! Yes I'm happy with the code 👍

@PhysSong
Copy link
Member

From #4899:

* Known Bug: Instrument windows are resized wrong in some cases when using the arrows to switch instruments in the instrument window. This bug does only affect projects with at least one "variable sized instrument".

Isn't this related to this PR? It means this PR doesn't break anything for now since we don't use this feature right now, but there are some issues with the code.

@JohannesLorenz
Copy link
Contributor Author

@PhysSong Unfortunately that's true. The code will not break anything, but will have this UI issue. I tried to fix it, but I really did not understand it. For now, I think Lv2 is more urgent than fixing that minor UI bug.

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

Successfully merging this pull request may close these issues.

2 participants