Wrap debugger control buttons when sidebar is narrow #892
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 the issue where debugger control buttons would be hidden when the debugger sidebar was narrow, requiring users to click an overflow menu to access them. With this change, buttons automatically wrap to the next row when the sidebar width is constrained, ensuring all controls remain visible and accessible.
Problem
Previously,
DebugControlsWidgetinherited fromQToolBar, which doesn't support automatic wrapping. When the sidebar was narrow, buttons would overflow and become hidden, making the debugger less accessible:Solution
Converted
DebugControlsWidgetfromQToolBartoQWidgetwith a customFlowLayoutthat automatically wraps buttons to additional rows when space is insufficient:Implementation Details
New Files
QLayoutsubclass that implements automatic wrapping behavior, based on Qt's standard custom layout patterns.Modified Files
QToolBartoQWidget, added button member variables while preserving action members for keyboard shortcuts.QToolButtonwidgets positioned byFlowLayout, maintained all existing functionality including tooltips, icons, and state management.Key Features
✅ No Hidden Buttons: All controls remain visible regardless of sidebar width
✅ Automatic Adaptation: Layout dynamically adjusts as sidebar is resized
✅ Backward Compatible: All public interfaces, signals, and slots preserved
✅ Keyboard Shortcuts: Continue to work through preserved
QActionconnections✅ Visual Consistency: Maintains same appearance when sidebar is wide
Testing
Manual testing should verify:
Original prompt
Fixes #891
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.