Skip to content

Fix empty space at bottom of Functions widget#3563

Draft
manideepikapasarthi wants to merge 3 commits intorizinorg:devfrom
manideepikapasarthi:fix-functions-widget-empty-space
Draft

Fix empty space at bottom of Functions widget#3563
manideepikapasarthi wants to merge 3 commits intorizinorg:devfrom
manideepikapasarthi:fix-functions-widget-empty-space

Conversation

@manideepikapasarthi
Copy link
Copy Markdown

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've updated the documentation with the relevant information (if needed)
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

This pull request fixes the extra empty space visible at the bottom of the Functions widget.

The issue was caused by the tree view not expanding properly within the dock widget.
This change updates the size policy of the tree view to allow it to expand correctly and enables the vertical scrollbar only when needed.

No functional behavior is changed; this is a UI/layout improvement only.

Test plan (required)

  1. Open Cutter.
  2. Load any binary with multiple detected functions.
  3. Open the Functions widget.
  4. Resize the window and dock area.

Result:

  • The Functions widget no longer shows unnecessary empty space at the bottom.
  • The tree view expands correctly.
  • Vertical scrollbar appears only when required.

Closing issues

closes #2789

@wargio
Copy link
Copy Markdown
Member

wargio commented Mar 2, 2026

please provide screenshot before and after.

@manideepikapasarthi
Copy link
Copy Markdown
Author

Hi! Here is a screenshot showing the bug on the unpatched v2.4.1 release — the Functions widget shows a large empty space below the last function entry when the panel is resized vertically.
Screenshot 2026-03-03 002737

My fix adds setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding) to the tree view, which tells Qt to fill all available vertical space with the list instead of leaving unused blank space. I also cleaned up a redundant line in my latest commit to keep the change minimal.

@Rot127 Rot127 added the Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. label Mar 3, 2026
@Rot127 Rot127 marked this pull request as draft March 3, 2026 13:53
@Rot127
Copy link
Copy Markdown
Member

Rot127 commented Mar 3, 2026

Please provide us with a "after" screenshot with the fix applied.

@PremadeS
Copy link
Copy Markdown
Collaborator

I'm pretty sure the empty space is caused by the status bar not showing any text initially. Try searching for something in the quick filter box. Setting the sizePolicy to Expanding isn't going to do much in this case

See #1923

@wargio
Copy link
Copy Markdown
Member

wargio commented Mar 13, 2026

then maybe we should show something like the initial total amount

@PremadeS
Copy link
Copy Markdown
Collaborator

then maybe we should show something like the initial total amount

For now, sure

But as a long term fix, putting the count indicator alongside the quick filter instead of being below is better. Also allowing the user to fully hide the count indicator through settings seems reasonable IMO
It's also mentioned in the issue I linked above (#1923)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Functions widget has empty space at bottom

4 participants