Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
stylebeatspopupDefaults: Essentials (Clock, Battery, System, Network, Calendar) 18×18 with spacing 14 (EssentialsPopup.popupinSources/StableBar/EssentialsDetails.swift), script menus 12×12 with spacing 4 (widgetPopupinBarView.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 ownstylepadding 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 setspopupDefaults.paddingVertical: 6only 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 (openTooltipinWidgetPopup.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:
defaultsand the widget's ownstyleno longer pass their paddings andspacingto them. Colors, fonts, border, corners and shadow still do. - Popups get their own default padding and spacing, picked from renders.
popupDefaultsoverrides it, and a popup's ownstyleoverrides 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
popupDefaultspadding 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 ownoffsetstill 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.paddingVerticalworkaround. 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
- feat: add Menu Bar, Island, Minimal and Terminal themes that restyle the whole bar #49 added
popupDefaults; Add a shared presentation system for themes and bar layout #55 kept the popup cascadedefaults→popupDefaults→ widgetstyle→ popupstyle, which stays for colors and fonts. - Set widget, popup and tooltip backgrounds independently #513 split widget, popup and tooltip backgrounds for the same kind of leak: the widget's background reaching its popup.
- Popups open far below the bar on a notched display when their shadow is large #643 and Clicking a widget doesn't open its popup while its hover slider shows #660 are about the popup's shadow margin, not its padding.
Triaged by Claude Code (Claude Opus 5.5).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
fix: keep tooltip padding compact in the states hover controls apply
docs: say which popups popupDefaults spacing reaches