Skip to content

Popups can't share one padding, spacing and gap below the bar #664

Open

Description

@M4n0x

Problem

popupDefaults is the style every popup inherits, and it accepts paddingHorizontal, paddingVertical and spacing, but setting them changes almost no popup:

  • Built-in popups set their own padding in code, and a popup's own style beats popupDefaults: Essentials (Clock, Battery, System, Network, Calendar) 18×18 with spacing 14 (EssentialsPopup.popup in Sources/StableBar/EssentialsDetails.swift), script menus 12×12 with spacing 4 (widgetPopup in BarView.swift), the update popup 14×14 with spacing 10 (AppUpdate.swift).
  • Every Store package sets its own, and they disagree: agent-status, ai-usage and now-playing use 18×16, quick-ask 14×12, amphetamine 12×12. Under one theme, popups get different paddings.
  • A popup without padding borrows the bar's widget padding. It falls back to defaults: 10×6 out of the box, 0×6 in Tonhalle Line, 3 pt vertical in Island and Leman. A widget's own style padding reaches its popup and its tooltip the same way (PopupConfiguration.baseStyle, WidgetConfiguration.tooltipStyle). That's too tight for a popup, so authors hard-code their own. Leman sets popupDefaults.paddingVertical: 6 only to undo its bar padding; Island doesn't, so its tooltips have 3 pt vertical padding.
  • The gap below the bar has no global setting. It is each popup's offset (default 6); tooltips and hover controls use a fixed 6 (openTooltip in WidgetPopup.swift).
  • Settings → Theme → Popups edits colors, weight, text size and corners, but not padding, spacing or the gap.

Proposal

  • Padding and spacing of popups and tooltips stop coming from the bar: defaults and the widget's own style no longer pass their paddings and spacing to them. Colors, fonts, border, corners and shadow still do.
  • Popups get their own default padding and spacing, picked from renders. popupDefaults overrides it, and a popup's own style overrides that.
  • Essentials, script menus and the update popup drop their hard-coded padding and follow popupDefaults. App menus keep their 5 pt menu padding.
  • Tooltips, hover controls and the More widgets tray stay compact at 10×6, whatever popupDefaults padding says, and keep sharing its colors, fonts, border and corners.
  • New bar.popupOffset (default 6): the gap below the bar for popups, tooltips, hover controls and the More widgets tray. A popup's own offset still wins. It is additive, and a kind of screen can set its own.
  • Settings → Theme → Popups gains Padding, Spacing and Gap rows.
  • Leman drops its popupDefaults.paddingVertical workaround. Store packages can drop their own padding later, with a minimum app version, or they would look cramped on older builds (follow-up in stablebar-packages).

This changes what defaults padding means for popups and tooltips, so it needs a maintainer's OK. A popup with "style": {} gets the popup default instead of the bar's widget padding; one that wants it tighter sets it in popupDefaults or its own style. Migrating old files would copy the bar's padding into those popups, which is the problem itself, so I'd propose no migration.

Possible today

Only per popup: padding and spacing in each configured popup's style, and offset on each popup. Essentials, script menus, the update popup and tooltips can't be changed.

Related

Triaged by Claude Code (Claude Opus 5.5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions