Skip to content

Gauge subtitle overlaps the ring for long status labels (e.g. 'Not Charging') #91

Description

@almothafar

Problem

On the main screen, the circular gauge's subtitle (the charging-status label) is too wide for long values like "Not Charging" — it spills over and overlaps the progress ring.

Cause

#74 made the gauge title (the "NN%" text) responsive — it shrinks to fit the inner circle. The subtitle never got the same treatment, so it draws at a fixed size (cpb_subtitleTextSize) and overflows for longer labels ("Not Charging", "Discharging", localized Arabic strings, etc.).

Likely fix

Mirror the title's responsive-shrink in CircularProgressBar.onDraw() for the subtitle: cache the base subtitle text size in initialize(), then in onDraw() measure the subtitle and scale it down if it exceeds ~the inner-circle width (same maxWidth approach as the title).

Files

  • app/src/main/java/.../ui/widget/CircularProgressBar.java (subtitle draw block)

Surfaced during on-device testing. Also affects Arabic status labels, which can be longer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions