Skip to content

feat(power-status): restyle battery level bar - #514

Merged
ggbond268 merged 1 commit into
mactools-app:mainfrom
AndrewDi:feat/power-status-battery-level-bar
Oct 31, 2026
Merged

ggbond268 merged 1 commit into
mactools-app:mainfrom
AndrewDi:feat/power-status-battery-level-bar

Conversation

@AndrewDi

Copy link
Copy Markdown
Contributor

Problem and result

The battery level bar in the Power Status panel was a thin 6 pt flat fill that looked disconnected from the panel's charging-card styling. It now renders as a taller capsule track with a tinted recess, a gradient fill, and a bright edge marker at the current charge level. No data, permission, or behavior changes.

Changes

  • Replace the flat 6 pt bar with a 14 pt capsule track: neutral track plus tinted recess, leading-to-trailing tint gradient with a top highlight, and a 2 pt bright marker with a soft glow at the fill boundary. The marker is hidden at 0 % and 100 %.
  • Keep the existing threshold tints (critical at or below 20 %, warning at or below 40 %, success otherwise).
  • Update the PowerStatusLayout height constants (batteryBarLabelSpacing, batteryTrackHeight, batteryBarHeight) so the estimated contentHeight stays accurate.
  • Add a plugin changelog fragment.

Verification

  • make build-plugin PLUGIN=PowerStatus passed.
  • make test TEST_FILTER=PowerStatusPluginTests/testContentHeightGrowsWithCapacityTiles passed.
  • make validate-changelog passed.
  • Rendered the bar in isolation with SwiftUI in dark and light appearance at 76 %, 35 %, 12 %, and 100 % to check contrast, the edge marker, and the empty/full states.

UI evidence

Before: a 6 pt flat rounded bar below the battery label.

After: a 14 pt capsule bar with a tinted recess, gradient fill, top highlight, and a bright edge marker at the current level. Light and dark appearance were reviewed with isolated component renders; the level marker disappears at 0 % and 100 %. Panel screenshots can be attached here on request.

Checklist

  • Core behavior and relevant risks are verified using existing tests, focused additions, or manual checks; results or limitations are recorded.
  • UI appearance was reviewed in light and dark appearance with isolated component renders; shared components, themes, localization, and accessibility are respected.
  • User-facing documentation and changelog fragments are updated when required.
  • Plugin metadata, runtime contracts, action policies, and minimum-host compatibility agree.
  • Licensing and third-party notices are complete; no credentials, local configuration, or unrelated generated files are included.

Replace the thin flat level bar with a taller capsule track using a tinted recess, gradient fill, and a bright edge marker at the current level.

Update the layout height constants so the estimated content height stays accurate.
@ggbond268
ggbond268 merged commit 192e93e into mactools-app:main Oct 31, 2026
2 checks passed
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