Skip to content

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

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

Make flame-chart events more compact and fix resize/expand behavior#888
Sajeeth-Wimalasuriyan wants to merge 8 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>
Comment thread src/view/src/rocprofvis_flame_track_item.cpp Dismissed
Co-authored-by: Cursor <cursoragent@cursor.com>
@tomk-amd

tomk-amd commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

In compact mode, the track gets too compact when the up (set min size) arrow gets pressed.

Expanded:

image

Minimized:

image

Sajeeth-Wimalasuriyan and others added 3 commits July 20, 2026 15:39
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	src/view/src/rocprofvis_flame_track_item.cpp
#	src/view/src/rocprofvis_flame_track_item.h
#	src/view/src/rocprofvis_track_item.cpp
#	src/view/src/rocprofvis_track_item.h
Re-apply the branch's meta-area compaction that was lost when adopting main's rewritten RenderMetaArea: render the track title in the small font and reduce the meta-area vertical padding (metadata_padding and window padding). Without these, compact-mode flame tracks rendered the title in the full-size font inside a short track, causing the title/controls to overflow. Keeps main's square ChildRounding for the selection highlight.

Co-authored-by: Cursor <cursoragent@cursor.com>
Floor the flame-track height to what the meta area actually needs (small-font
title plus the tallest visible pill) so compact mode can no longer collapse the
description column into an unreadable strip. Position the expand/contract arrow
by its true frame height and reserve that width in the title/pill layout so the
control stops overflowing onto the track separator and overlapping long titles.

Preserve expanded/default intent across font-size changes and compact-mode
toggles by deriving the prior height geometrically instead of relying solely on
the transient expanded flag, and grow (never shrink) tracks whose meta floor
rises at runtime. Centralize the meta-area minimum-height math in TrackItem and
update the FlameTrackItem notes in .agents/AGENTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Sajeeth-Wimalasuriyan
Sajeeth-Wimalasuriyan requested a review from a team as a code owner July 21, 2026 19:16
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.

3 participants