Describe the bug
The Wiki popup frame has a hardcoded fixed minimum height ( 420px), regardless of the content length. Short wiki entries have excessive empty vertical space at the bottom.
To Reproduce
- Open a project with wiki entries.
- Hover over a keyword that has a short wiki definition (e.g., 1-2 lines).
- Observe the large empty space below the text in the popup.
Expected behavior
The Wiki frame should dynamically adjust its height based on the content
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu
- Version: 24.04
Additional context
context We attempted to fix this by calculating the document height dynamically in WikiFrame::setContent using QTextDocument::size() and setFixedHeight(). However, this failed because:
QMarkdownTextEdit (inheriting from QPlainTextEdit) made accurate height calculation difficult due to internal margins and layout timing. The calculated height was often slightly off, causing the content to appear "squeezed" with an unwanted scrollbar appearing even when the text should fit. setDocumentMargin is not available on QMarkdownTextEdit, complicating the removal of internal padding for accurate measurement.
Describe the bug
The Wiki popup frame has a hardcoded fixed minimum height ( 420px), regardless of the content length. Short wiki entries have excessive empty vertical space at the bottom.
To Reproduce
Expected behavior
The Wiki frame should dynamically adjust its height based on the content
Screenshots
Desktop (please complete the following information):
Additional context
context We attempted to fix this by calculating the document height dynamically in
WikiFrame::setContentusingQTextDocument::size()andsetFixedHeight(). However, this failed because:QMarkdownTextEdit(inheriting fromQPlainTextEdit) made accurate height calculation difficult due to internal margins and layout timing. The calculated height was often slightly off, causing the content to appear "squeezed" with an unwanted scrollbar appearing even when the text should fit.setDocumentMarginis not available onQMarkdownTextEdit, complicating the removal of internal padding for accurate measurement.