fix(theme): panel element headings clipped — only top ~60% visible #325
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Panel element headings (e.g., QGroupBox titles, QSint::ActionGroup headers in the task panel) are being clipped by the content area below them, so only the top ~60% of the heading text is visible.
Root Cause Analysis
There are several likely contributing factors in the KindredCreate (Catppuccin Mocha) theme:
QGroupBox titles
In
KindredCreate.qss(line ~732), the QGroupBox has:The upstream
FreeCAD.qssusesmargin-top: 18pxto leave space for the title. The KindredCreate theme reduces this to 12px, which may not leave enough room for the title to render fully — especially at larger font sizes or higher DPI.Task panel headers (QSint::ActionGroup)
The header height is calculated in C++ (
ActionPanelScheme):The task header layout uses tight margins:
And the header frame gets
setFixedHeight(scheme->headerSize). If the QSS padding or border adds height that isn't accounted for in the C++ calculation, the text gets clipped.QDockWidget title bars
The
min-height: 18pxin KindredCreate.qss (line ~254) may be too small when combined withpadding: 8px 6px— the total needed height is font-height + 16px (padding) + border, but the min-height doesn't account for this.Proposed Fix
margin-topto at least16px(or back to18px) to match the space needed by the title. Consider also addingpadding-topto ensure content doesn't overlap.headerSizecalculation to account for QSS padding/borders, or ensure the QSS styling forQSint--ActionGroup QSint--ActionLabel[class="header"]doesn't add height beyond what the C++ code allocates.min-heightor remove it and let Qt auto-size based on padding + font metrics.Files to Modify
src/Gui/Stylesheets/KindredCreate.qss— primary theme stylesheetsrc/Gui/QSint/actionpanel/actionpanelscheme.cpp— header size calculationsrc/Gui/QSint/actionpanel/taskheader_p.cpp— header layout margins