Skip to content

Add native-style Liquid Glass OSD HUD for macOS 26 and 27 - #1931

Open
tusharxclaude wants to merge 9 commits into
MonitorControl:mainfrom
tusharxclaude:feat/macos27-liquid-glass-osd
Open

tusharxclaude wants to merge 9 commits into
MonitorControl:mainfrom
tusharxclaude:feat/macos27-liquid-glass-osd

Conversation

@tusharxclaude

@tusharxclaude tusharxclaude commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

In macOS 26/27 (Tahoe+), the private OSDUIHelper XPC service no longer displays the legacy chiclet HUD when OSDManager.sharedManager().showImage(...) is called. As a result, adjusting brightness, contrast, or volume on external displays via MonitorControl produces no on-screen feedback.

This PR introduces a native macOS 26+ Liquid Glass On-Screen Display HUD (MacOS27OSDHudController, OSDHudPanel, MacOS27OSDHudView) in OSDUtils.swift while preserving the legacy OSDManager path for macOS 15 and earlier.

What's Changed

  • Native NSGlassEffectView Banner Pill (292 × 63 pt, cornerRadius = 19.5):
    • Uses the adaptive SystemBanner glass variant (_variant = 9 / notificationCenter material at 63 pt height) so the backdrop preserves wallpaper color saturation and renders the native luminous specular rim.
    • Displays the friendly display name (Display.getFriendlyName()), a pill badge (56%, 56% • 280 nits when nits calibration is available, or Locked), min/max SF Symbols (sun.min.fill/sun.max.fill, speaker.fill/speaker.wave.3.fill, circle.lefthalf.filled/circle.righthalf.filled), a continuous progress bar, and 16 chiclet tick dots.
  • Active Glass Rim on Non-Activating NSPanel:
    • Overrides hasKeyAppearance, _hasActiveAppearance, and _hasActiveControls on the borderless .nonactivatingPanel with hasShadow = false so NSGlassEffectView renders its luminous specular glass border without stealing focus from the active app or drawing a dark rectangular window shadow.
  • Real-Time Backdrop Luminance Adaptation, Reduce Motion, and VoiceOver Accessibility:
    • Uses a WindowServer-aware CABackdropLayer (tracksLuma = true) with hysteresis (0.45 / 0.53) to sample the real-time luminance behind the HUD pill and automatically flip the glass appearance and foreground colors (.darkAqua vs. .aqua), preventing dark-on-dark or white-on-white text regardless of the system Light/Dark mode setting.
    • Respects NSWorkspace.shared.accessibilityDisplayShouldReduceMotion to skip fade animations when Reduce Motion is enabled.
    • Exposes .levelIndicator accessibility role, display title label, and percentage/nits value on the track bar for VoiceOver.
  • Multi-Display & Hardware/Software Control Routing:
    • Adds DisplayManager.resolveEffectiveDisplayID(_:) and routes OSD calls through the effective display ID so virtual/software-dimmed displays resolve to their physical screen.

Screenshots

Dark Green Backdrop (luma = 0.27 → .darkAqua) Light Green Backdrop (luma = 0.78 → .aqua)
Dark Green Wallpaper Light Green Wallpaper
Dark Backdrop in Light Mode (luma = 0.12 → .darkAqua) Light Backdrop in Dark Mode (luma = 0.95 → .aqua)
Dark Desktop Light Desktop

@tusharxclaude
tusharxclaude force-pushed the feat/macos27-liquid-glass-osd branch from 39278cf to de96437 Compare October 26, 2026 12:37
@tusharxclaude
tusharxclaude force-pushed the feat/macos27-liquid-glass-osd branch from de96437 to a4e60d5 Compare October 26, 2026 13:11
@waydabber waydabber added the AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community label Nov 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants