Skip to content

Draw a value as a ring, with a symbol in its center #689

Closed

Description

@Seb-GRAF

Problem

A widget can show a value as text, a straight progress rule, a graph or the battery shape, but not as a ring. A ring is the usual compact way to show a level, as Apple's Batteries widget and menu bar apps like DuoBar do: a battery or CPU level drawn around a symbol takes one icon's width instead of a symbol and a percentage.

#641 asked for native SwiftUI plugins so DuoBar's ring glyph could live in StableBar. A ring block gives that look through layouts, so it follows the theme and runs no native code.

Proposal

  • A ring block, usable wherever blocks are: bar layouts, popups, hoverLayout and overlay.
  • It reads values[source], or a 0–1 number in fields[source], as progress does, and fills clockwise from the top.
  • style.accent is the fill and style.background the track, as for progress. style.iconSize sets its diameter, as for symbol and battery, and lineWidth its stroke, as for graph.
  • children are drawn centered inside the ring, such as a symbol.
  • Changes animate with the block's animation, as progress does.
  • VoiceOver reads the value as a percentage, as it does for a graph shown without text.
{
  "type": "ring", "source": "percent", "lineWidth": 2, "style": { "iconSize": 16 },
  "children": [{ "type": "symbol", "name": "bolt.fill", "style": { "iconSize": 8 } }]
}

Possible today

No. progress draws a straight rule and battery only macOS's battery shape. Blocks can't be layered either: overlay sits at the widget's bottom edge, so a symbol can't sit inside another block.

Related

Triaged by Claude Code via T3 Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Nov 16, 2026
  2. stablebar-releases commented on Nov 16, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.16.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions