chore(UI): centeralize rounded button highlight#2454
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds pill-rounded button highlight helpers and a popup/modal wrapper with rounded close handling, implements and exposes rounded highlight APIs, and updates IconButton, several windows/popups, and header icon hover rendering to use the new utilities. ChangesRounded Button Highlight System
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Utils/UI.cpp`:
- Around line 710-725: DrawRoundedCollapseHighlight currently always computes
the title-button origin using a left-anchored pos.x which breaks hover/active
feedback when ImGui::GetStyle().WindowMenuButtonPosition == ImGuiDir_Right;
update the function so that after retrieving style and computing the base pos.x
you check style.WindowMenuButtonPosition and, if ImGuiDir_Right, mirror/flip the
x coordinate (or compute pos.x from window->Pos.x + window->Size.x - ...
instead) before calling TitleBarButtonRect and IsTitleBarButtonHovered so the
bb/hit tests align with the actual collapse control; adjust any dependent
variables (bb, hovered, held) accordingly in DrawRoundedCollapseHighlight.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e2f0e51b-ba56-498f-8fc1-ee2ce2247b27
📒 Files selected for processing (7)
src/CSEditor/EditorWindow.cppsrc/Features/CSEditor.cppsrc/Features/PerformanceOverlay.cppsrc/Menu.cppsrc/Menu/FeatureListRenderer.cppsrc/Utils/UI.cppsrc/Utils/UI.h
|
✅ A pre-release build is available for this PR: |
…ight # Conflicts: # src/Features/PerformanceOverlay.cpp # src/Menu/FeatureListRenderer.cpp
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Menu/MenuHeaderRenderer.cpp`:
- Around line 316-320: Confirm that DrawRoundedButtonHighlight is called with
the correct 5-argument signature (min, max, hovered, active, drawList) as
declared in Utils::UI.h; ensure the call using interactionRect.Min,
interactionRect.Max, isHovered, isHovered &&
ImGui::IsMouseDown(ImGuiMouseButton_Left), fgDrawList matches that overload and
does not try to use a rounding overload. Also update the PR title to correct the
typo by changing "centeralize" to "centralize".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c9129b5f-4631-4436-93b3-bf48535e2458
📒 Files selected for processing (3)
src/Menu/MenuHeaderRenderer.cppsrc/Utils/UI.cppsrc/Utils/UI.h
🚧 Files skipped from review as they are similar to previous changes (2)
- src/Utils/UI.h
- src/Utils/UI.cpp
Summary by CodeRabbit