Skip to content

Thin borders lose their top and left edges on screens that aren't Retina #933

Done

Description

@M4n0x

What happens

On a screen that isn't Retina, borders whose width isn't a whole number of pixels lose part of their straight top and left edges, while the bottom and right edges draw:

  • Setup's preset and theme cards (0.5 pt) have no top or left edge at all.
  • Fern's outline around a visible workspace (1.5 pt) has a gap along its straight top.
  • Setup's selected card (2.5 pt) is a pixel thinner at the top and left than at the bottom and right.

The same holds for every border drawn half a point or 1.5 points wide, from the code or from a theme: glass controls in setup and Share My Bar, the bar editor's drop zones, a slider's knob, and Settings' 1.5 pt and 2.5 pt outlines.

Setup's cards on a 1x display: the right and bottom edges show, the top and left don't

Fern's visible workspace outline on the bar, enlarged: a gap along the top

Steps to reproduce

  1. Use a display at 1x, such as a 2560 × 1440 external display at its native resolution.
  2. Open setup (Getting Started…) and look at the cards on Make it yours, or select the Fern theme and look at a visible workspace's outline on the bar.

Expected

Each border is even on all four sides, as on a Retina display.

Environment

  • StableBar built from main (1552607), Fern 1.6.0
  • macOS 27.2.1, Dell U2722D at 2560 × 1440 (1x) beside the built-in Retina display
  • Reproduced in a macOS 27.2 VM with a 1x display

Evidence

Measured on the 1x display, as a pixel's brightness against the background and fill:

Border Top Bottom Left Right
Setup card, 0.5 pt none line none line
Fern workspace, 1.5 pt 1 row in the middle 2 rows round round
Selected card, 2.5 pt 2 rows 3 rows 2 rows 3 rows

The scenes CI draws don't show it: they're made offscreen at 2x through Core Graphics, which draws these borders evenly. So do ImageRenderer and cacheDisplay at 1x.

Diagnosis

Borders are drawn with SwiftUI's strokeBorder at their width in points, such as lineWidth: 0.5 in Sources/StableBar/Setup/SetupTour.swift (SetupTile) and Sources/StableBar/Settings/GlassControls.swift (GlassSurface), and a theme's borderWidth in Sources/StableBar/Workspaces/WorkspaceView.swift (Fern's workspaceDefaults.style.states.visible.borderWidth is 1.5), Bar/WidgetView.swift, Bar/BarUnitView.swift, Bar/BarBorder.swift, Popups/PopupView.swift and Popups/PopupBlockView.swift.

On a 1x screen, 0.5 or 1.5 points leaves a row of pixels the border covers only in part. On screen, macOS leaves out that part along a straight top or left edge, from the pixel's own edge, but draws it along the bottom and right. Curved parts draw evenly. A border a whole number of pixels wide draws evenly on every side.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 25, 2026
  2. added 2 commits that reference this issue on Nov 25, 2026
    01f6fd6
    baf8453
  3. stablebar-releases commented on Nov 29, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.20.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

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions