Skip to content

normalized spacing in menu popup#345

Open
roybotbot wants to merge 1 commit intosteipete:mainfrom
roybotbot:padding-tweaks
Open

normalized spacing in menu popup#345
roybotbot wants to merge 1 commit intosteipete:mainfrom
roybotbot:padding-tweaks

Conversation

@roybotbot
Copy link

@roybotbot roybotbot commented Feb 10, 2026

Fixes inconsistent padding throughout the CodexBar menu popup.

Changes

Before:
before

After:
after

Summary

This PR fixes inconsistent padding and spacing throughout the CodexBar menu popup.

Changes Made

Header Section Padding

✅ Increase top/bottom padding so the highlighted provider header has proper breathing room
✅ Move divider out of the header view into a separate menu separator
✅ Remove showDivider parameter from UsageMenuCardHeaderSectionView

These changes fix:

  • Cramped "Claude / Updated ..." header area
  • Blue selection highlight overlapping the divider line below the header

Card Section Spacing

✅ Unify all card sections to consistent padding values (8pt top, 6pt bottom)
✅ Remove conditional 4/6pt bottom padding logic
✅ Fix double separators when both credits and extra usage sections are present

Problem: Sections used different padding values depending on which other sections were visible, and a logic error added two consecutive separators when
credits + extra usage were both present.

Solution: Each section now uses the same sectionSpacing and sectionPadding values, and each section adds exactly one separator before itself.

Action Item Section Spacing

✅ Add spacers above and below each action group to match card section spacing
✅ Consolidate separator ownership so each section manages its own leading separator

Problem: The action item groups (Add Account...Status Page, Settings...Quit) had tighter padding than the card sections above them, and relied on trailing separators from previous sections.

Solution: Added 4px spacers above and below each action group for symmetric padding around divider lines.

Testing

  • Built and tested locally
  • Verified header highlight no longer overlaps divider
  • Confirmed consistent spacing across all menu sections
  • No regressions in menu card rendering or submenu behavior

Files Modified

 ┌──────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────┐
 │ File                                             │ Changes                                                           │
 ├──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┤
 │ Sources/CodexBar/MenuCardView.swift              │ Header padding, removed showDivider, unified section padding      │
 ├──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┤
 │ Sources/CodexBar/StatusItemController+Menu.swift │ Separator logic, spacers, unified padding values, highlight inset │
 └──────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────┘

Impact

  • Fixes cramped header padding in the menu popup
  • Fixes highlight overlapping divider line
  • Fixes inconsistent spacing between all menu sections
  • No breaking changes

Signed-off-by: Roy Natian <hi@roy.wtf>
@roybotbot roybotbot marked this pull request as draft February 10, 2026 08:44
@roybotbot roybotbot marked this pull request as ready for review February 10, 2026 08:44
@roybotbot
Copy link
Author

I just realized this needs to be tested with multiple providers. I only tried it to see my Claude stats.

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.

1 participant