Make flame-chart events more compact and fix resize/expand behavior#888
Open
Sajeeth-Wimalasuriyan wants to merge 4 commits into
Open
Make flame-chart events more compact and fix resize/expand behavior#888Sajeeth-Wimalasuriyan wants to merge 4 commits into
Sajeeth-Wimalasuriyan wants to merge 4 commits into
Conversation
- 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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.