Repository navigation
Description
Problem
The bar takes the full top edge of the screen, but clicks reach a widget only inside its tile. The space between a tile and the screen's edge does nothing: above the tile, beside the first and last widget, and in any bar.margin. To hit a widget, you have to stop the pointer inside the tile.
The screen edge is the easiest target on a Mac: the pointer stops there however far you move it. macOS's own menu bar uses this, so a click at the very top-left corner opens the Apple menu. On StableBar the same click misses.
Example with the Clear theme (bar.height 37, bar.inset 14, widget paddingVertical 5): the Apple logo's tile is about 26 pt tall, centered in the 37 pt strip, and starts 14 pt in from the left edge. A click at the top-left corner lands about 5 pt above the tile and 14 pt to its left, so nothing happens.
Environment: StableBar 0.19.0, macOS 27.2.1, Clear theme, bar on the top edge with offset 0.
Proposal
A click in the bar's empty space goes to the widget it lines up with, like an edge-to-edge menu bar:
- Above or below a tile (between the tile and the screen edge, or the far edge of the strip), the click goes to the widget whose column holds the pointer.
- Beside the first or last widget of the bar (the
inset, a sidemargin, out to the screen edge), the click goes to that widget, so the screen's corners hit the outermost widgets. - The hover highlight follows the same areas, so you can see what a click will hit.
- Space that lines up with no widget, such as a wide gap between the left and right groups, keeps today's behavior: the bar's right-click menu, and nothing on a left click.
Questions for a maintainer:
- Should this be a default or a setting (for example
bar.edgeClicks)? A floating theme such as Tonal draws its margin as empty space outside the bar, where taking clicks may surprise people. - With a bar at the bottom, the same applies to the bottom edge.
- Edit Bar in Place and drags should keep their current hit areas.
Possible today
Only partly. Raising the widgets' paddingVertical (or setting their height) so tiles fill the strip, and setting bar.inset to 0, removes most of the gap. But it changes how tiles and their hover background look, and every theme would need its own values.
Related
- Widget clicks only work on the label instead of the whole tile #45 and fix: let the Apple logo's whole tile take its click #575 made a widget's whole tile take clicks (not only its label or glyph). This request extends the click area past the tile to the screen edge.
- Clicks on the bar show the macOS menu bar on notched displays in macOS 27 #366 (fixed) was macOS's auto-hiding menu bar taking clicks on the strip of a notched display. Clicks at the very top edge on such a display should still reach the bar.
Triaged by Claude Code (Claude Opus 5.5).
Activity