Fix measurement UI overflow in TabbedView (issue #72) - #82
Open
rbrenesh wants to merge 1 commit into
Open
Conversation
…ScopeFoundry#72) Commit a8bd1f5 wrapped QMdiArea in a QScrollArea to allow free window resizing, but in TabbedView mode this caused the active measurement tab to extend past the visible window edge — QMdiArea's content-driven minimumSizeHint inflated the outer scroll area beyond the viewport. Restore QMdiArea as a direct child of col_splitter so the splitter bounds it to the available window space, and switch its policy from MinimumExpanding to Expanding so the window can shrink below sizeHint. Zero the minimum size on QMdiArea explicitly to override any internal floor from minimumSizeHint(). Wrap each measurement widget in a QScrollArea inside add_mdi_subwin so that when a UI's natural minimum width exceeds the available tab area, scrollbars appear inside the tab instead of forcing the window to grow. Zero the minimum size on both the scroll area and the QMdiSubWindow so the chain doesn't reintroduce a per-measurement minimum.
Contributor
Author
|
Messed around with the base UI until I found something that worked. On my end, all modes worked as before except for tabbed mode, that keeps the horizontal scroll wheel if the measurement UI doesn't fit inside the original ScopeFoundry app, otherwise, the UI shrinks to fit within it (if specified by the user in their .ui file for their measurement) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #72 — measurement UIs extending past the visible edge of the tabbed window.
Commit a8bd1f5 wrapped
QMdiAreain aQScrollAreato allow free window resizing. InTabbedViewmode this caused the active measurement tab to extend past the visible window edge —QMdiArea's content-drivenminimumSizeHint()inflated the outer scroll area beyond the viewport.This PR keeps the free-resize behavior that motivated a8bd1f5 while fixing the tab overflow:
base_microscope_app_mdi.ui: RestoreQMdiAreaas a direct child ofcol_splitter(remove the outerQScrollAreawrapper), and switch its size policy fromMinimumExpandingtoExpandingso the window can shrink belowsizeHint().base_microscope_app.py_setup_ui_base: Zero the minimum size onQMdiAreaexplicitly to override any internal floor fromminimumSizeHint().base_microscope_app.pyadd_mdi_subwin: Wrap each measurement widget in aQScrollArea(widgetResizable=True)so that when a UI's natural minimum width exceeds the available tab area, scrollbars appear inside the tab instead of forcing the window to grow. Zero the minimum size on both the inner scroll area and theQMdiSubWindowso nothing in the chain reintroduces a per-measurement minimum.The result:
.uihas a large natural minimum size — scrollbars appear inside the tab as needed.Test plan
TabbedViewmode, even for measurement UIs with large minimum widths (a per-tab scrollbar appears instead).SubWindowViewmode — confirm subwindows still move and resize normally.