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

Improve SplitterHandle of PropertyTreeWidgets #1760

Merged

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Jul 31, 2022

Various fixes and improvements to the SplitterHandle used in PropertyTreeWidgets. Fixes #1758.

before after
image image

Suppress horizontal scrolling and auto-resizing of columns:
- setStretchLastSection(false)
- use QHeaderView::resizeSection()
rhaschke added 8 commits July 31, 2022 09:26
- magenta-colored unsymmetric border for QTreeView
- yellow background for SplitterHandle
- debug output for window sizes
- F5 triggers updateGeometry
- Use qBound for clamping
- Use content rect reference
Only use actual contentsRect() for calculations
This reverts commit 2f71723.
@rhaschke rhaschke force-pushed the fix-SplitterHandle branch from 0f364f2 to 0990fa8 Compare July 31, 2022 08:13
@rhaschke rhaschke merged commit 4f66819 into ros-visualization:melodic-devel Aug 1, 2022
@rhaschke rhaschke deleted the fix-SplitterHandle branch August 1, 2022 06:58
@rhaschke rhaschke mentioned this pull request Aug 12, 2022
rhaschke added a commit that referenced this pull request Aug 12, 2022
Fixup to #1760. 

To avoid horizontal scrolling:
- setStretchLastSection(false)
- Decrease the shrinking column first before increasing the other one
- Consider Resize events of the viewport, not the QTreeView itself
- In case horizontal scrolling still occurs, have the scrollbar visible at least.

New feature:
- Allow zero width for both, name and value column
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.

1 participant