Skip to content

Let a popup slider draw as a filled pill in the theme's colors #642

Closed

Description

@M4n0x

Problem

A slider block always draws the stock macOS slider (PopupSlider in Sources/StableBar/PopupView.swift, or EndStopSlider when it has an endStop). Its style can't reach it: height, background, cornerRadius and accent don't change the control, and in popups on macOS 26 and later it draws tick lines and a gray knob (noted in #404).

So a theme can't give a popup a slider in its own look. For example, a Sound popup whose volume control is a 40 pt pill on the theme's raised surface, filled from the left in the accent color, with a speaker glyph inside the fill, set by dragging or clicking anywhere, as tonal designs such as Material 3 or Control Center draw it.

Proposal

An opt-in look for slider blocks that StableBar draws itself, taking its shape from the block's style:

{
  "type": "slider", "title": "Volume", "source": "volume", "onChange": "…",
  "filled": true, "icon": "speaker.wave.2.fill",
  "style": { "height": 40, "cornerRadius": 20, "background": "@token.surfaceRaised" }
}
  • filled: true replaces the native control with a bar: the block's background is the track (a faint text-color track without one), accent fills it from the leading edge and cornerRadius rounds both. Its height is style.height.
  • icon, an optional SF Symbol, sits at the leading edge inside the fill, in accentText. The fill is never narrower than the bar is tall, so the glyph always sits on it; the slider asks for the width that takes, more with an end stop.
  • Clicking or dragging anywhere sets the value from the pointer, snapped to step. The fill follows live, and onChange gets VALUE when the drag ends, as today.
  • The arrow keys move it by step, and VoiceOver reads its title and value and can adjust it. Its focus look follows whatever Popup sliders, toggles, segmented controls, the chooser and text fields show no keyboard focus #517 settles for sliders.
  • With an endStop, as on Amphetamine's duration slider, the steps end at a notch, the end stop's label sits on the bar past it, and choosing it fills the whole bar.
  • Additive: sliders without filled stay native. Needs the schema, the decoder, docs/popups.md and a scene.

Possible today

No. A progress block can show the level in that shape but can't be dragged; a row of clickable segments can set it in steps, without dragging.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Nov 14, 2026
  2. added a commit that references this issue on Nov 14, 2026
    f0d2f2c
  3. 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