Skip to content

[BUG] WikiFrame has fixed height regardless of content length #7

Description

@com3dian

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

Image

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.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv0.0.1

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions