Skip to content

Configurable glass / translucency across the app - #70

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1791315902-glass
Oct 6, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1791315902-glass

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a fully configurable "glass" look: the app window can request a translucent/blurred OS backdrop, and every major surface (sidebar, tab strip, toolbar, menus & popovers, Settings panel, editor) gets its own on/off toggle + opacity slider, with an optional tint and editor-text legibility options. Everything applies live and persists in the kv settings file; when glass is off every colour is byte-identical to today.

  • New src/glass.rs holds the whole model: Surface enum with per-surface key()/default_percent() (sidebar + tab strip default to 75%, everything else opaque), Material with per-OS options()/default_for_os() (macOS → Blur; Windows → Acrylic/Mica/Mica Alt; Linux → "Compositor" = Transparent, or Blurred on KDE), the Glass global built from_settings, and the alpha/tint helpers (glass::bg, root_bg, blend/mix_u32, text_alpha/text_contrast). Glass defaults ON where the OS can blur, OFF on GNOME.
  • Window material: WindowOptions.window_background is set at open and apply_window calls window.set_background_appearance() on every settings save — Opaque when disabled, so off = exactly today's look.
  • Render sites swap their flat .bg(pal.*) for glass::bg(pal.*, Surface::X, cx) across app.rs, sidebar.rs, tabs_ui.rs, main_view.rs, spaces_ui.rs, files_menu.rs, links_ui.rs, find_ui.rs, search_ui.rs, update_ui.rs, tour.rs; popover-based menus are retinted via theme.popover in glass::apply, re-applied after apply_theme's crossfade (which lerps only the Palette global) and after theme::apply inside appearance_changed. No Palette fields added, so theme::lerp is untouched; glass::bg reads the render-pass palette, so the crossfade stays live with glass on.
  • Settings > Appearance > Glass: master toggle, Material pill (only OS-valid options, with a compositor hint on Linux / GNOME warning), one Intensity slider that scales every enabled surface, and a presence()-animated Advanced/Avançado disclosure with the per-surface toggles+sliders, Theme-colour/Custom tint (ColorPicker + strength slider) and text options. New strings in en + pt-BR; settings keys appended in store.rs with glass_ prefix, missing keys → defaults.
  • Editor text: text opacity slider plus a high-contrast toggle. GPUI 0.3.4 has no text shadow primitive, so legibility is implemented as a colour nudge — mix_u32 blends each run colour 40% toward pal.fg before applying text_alpha; dim_runs' fade target is glassed too so focus-mode dimming stays consistent.

Tests: glass_defaults_and_roundtrip in store.rs plus 5 tests in glass.rs covering off-is-opaque-identical, per-surface opacity, intensity scaling, tint blend and text alpha/contrast.

Not done / known limits: no text shadow (GPUI lacks it) — replaced by the contrast-nudge toggle as agreed; macOS Blurred is a light frost (NSVisualEffectMaterial::Selection), so backdrop bleed-through is subtle — the per-surface translucency does the visible work; GNOME has no compositor blur (warning shown, glass defaults off there).

Screenshots

Glass off — exactly today's look

glass off

Defaults, light theme — sidebar + tab strip 75%, rest opaque

defaults light

Defaults, dark theme

defaults dark

Custom tint (pink, 70% strength) + sidebar/tabs 60% + editor 30%, dark

custom tint dark

Settings panel at ~12% — note text bleeds through

settings panel translucent

Context menu at ~17% — note text visible through menu

context menu translucent

Settings UI — minimal Glass section

settings glass section

Advanced disclosure — per-surface toggles, tint and text options

advanced glass options

Editor surface at 37%

editor glass

Link to Devin session: https://app.devin.ai/sessions/6b72af84455e479ba9fc810aa53400fb
Open in Devin Desktop: https://app.devin.ai/desktop/session/6b72af84455e479ba9fc810aa53400fb?variant=devin
Requested by: @horizzon3507

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

- New src/glass.rs: per-surface alpha model (sidebar, tab strip, toolbar,
  menus & popovers, Settings panel, editor), window material mapping to
  WindowBackgroundAppearance per OS, tint blending and text-opacity helpers.
- Window material via WindowOptions.window_background and live
  set_background_appearance: Blur on macOS, Acrylic/Mica/MicaAlt on Windows,
  Compositor (Transparent / KDE Blurred) on Linux; Opaque when off.
- glass_bg helper applied at render sites; opaque colours byte-identical
  when glass is disabled.
- Settings > Appearance > Glass: master toggle, material pill, intensity
  slider, and a presence()-animated Advanced disclosure with per-surface
  toggles/sliders, theme/custom tint (+ colour picker) and text options.
  All persisted in the kv settings file; missing keys fall back to
  defaults. Menus & popovers retinted via theme.popover.
- Editor text: opacity slider plus high-contrast legibility option
  (colour nudge toward palette fg; GPUI has no text shadows).
- i18n en + pt-BR keys; settings round-trip/default and alpha-helper
  unit tests.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1791315902-glass branch from 64fe1f7 to 5fdd0fd Compare October 6, 2026 20:49
@devin-ai-integration
devin-ai-integration Bot merged commit 086f51a into main Oct 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant