Skip to content

Make flame-chart events more compact and fix resize/expand behavior#888

Open
Sajeeth-Wimalasuriyan wants to merge 4 commits into
mainfrom
sw-flame-optimization
Open

Make flame-chart events more compact and fix resize/expand behavior#888
Sajeeth-Wimalasuriyan wants to merge 4 commits into
mainfrom
sw-flame-optimization

Conversation

@Sajeeth-Wimalasuriyan

Copy link
Copy Markdown
Contributor
image

Made flame-chart event tracks more compact by scaling the event row height to the active text font instead of a fixed 40px, vertically centering labels, and adding a 1px gap between stacked events. Enforced a per-row minimum track height so resizing can no longer squeeze the meta area small enough for its controls to collide. Finally, reworked the expand/contract arrow logic so a squished one- or two-level track reliably shows the expand arrow to reopen it.

- Scale event row height with the active text font instead of a fixed
  40px, and vertically center labels so they stay balanced at any size.
- Draw a 1px gap between vertically stacked events (and their selection
  outline) via a new GetEventLevelSpacing().
- Enforce a per-row minimum track height on resize so the meta area can
  no longer be squeezed small enough for its controls to collide.
- Rework the expand/contract arrow visibility so a squished one- or
  two-level track reliably shows the expand arrow to reopen it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/view/src/rocprofvis_settings_manager.cpp Fixed
Sajeeth-Wimalasuriyan and others added 2 commits June 18, 2026 14:29
- Update event row height live on font-size changes so large fonts no
  longer clip labels.
- Vertically center event labels using the rendered glyph bounds so the
  text is optically centered in the box.
- Default flame-track height now fits exactly two stacked events plus
  their spacing, unless the user saved a custom height.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rrow

Co-authored-by: Cursor <cursoragent@cursor.com>
{
RecalculateTrackHeight();
}
else if(previous_level_height > 0.0f && m_level_height != previous_level_height)
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants