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

Maximize windows part 2 #1510

Merged
merged 2 commits into from
Nov 11, 2022
Merged

Maximize windows part 2 #1510

merged 2 commits into from
Nov 11, 2022

Conversation

srcejon
Copy link
Collaborator

@srcejon srcejon commented Nov 11, 2022

Add maximize button to MainSpectrum and expandible Channels and Features.

Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is rolled, so we can remove resizing code from all of the individual channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start out at minimum needed size (which should restore appearance prior to last patch).

In stackSubWindows, use available space for channels if no spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that when maximimzing a window, QOpenGLWidgets aren't always paint properly immediately afterwards, so the code forces an additional update. I can't see why the first call to paintGL doesn't work.

Let me know if you see anything odd.

Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
@f4exb
Copy link
Owner

f4exb commented Nov 11, 2022

Looks good to me thanks!

@f4exb f4exb merged commit e319267 into f4exb:master Nov 11, 2022
@srcejon srcejon deleted the channel_maximize branch December 22, 2022 10:41
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 this pull request may close these issues.

2 participants