Repository navigation
Configurable glass / translucency across the app - #70
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
- 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
Bot
force-pushed
the
devin/1791315902-glass
branch
from
October 6, 2026 20:49
64fe1f7 to
5fdd0fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
src/glass.rsholds the whole model:Surfaceenum with per-surfacekey()/default_percent()(sidebar + tab strip default to 75%, everything else opaque),Materialwith per-OSoptions()/default_for_os()(macOS → Blur; Windows → Acrylic/Mica/Mica Alt; Linux → "Compositor" = Transparent, or Blurred on KDE), theGlassglobal builtfrom_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.WindowOptions.window_backgroundis set at open andapply_windowcallswindow.set_background_appearance()on every settings save —Opaquewhen disabled, so off = exactly today's look..bg(pal.*)forglass::bg(pal.*, Surface::X, cx)acrossapp.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 viatheme.popoveringlass::apply, re-applied afterapply_theme's crossfade (which lerps only thePaletteglobal) and aftertheme::applyinsideappearance_changed. NoPalettefields added, sotheme::lerpis untouched;glass::bgreads the render-pass palette, so the crossfade stays live with glass on.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 instore.rswithglass_prefix, missing keys → defaults.text opacityslider plus a high-contrast toggle. GPUI 0.3.4 has no text shadow primitive, so legibility is implemented as a colour nudge —mix_u32blends each run colour 40% towardpal.fgbefore applyingtext_alpha;dim_runs' fade target is glassed too so focus-mode dimming stays consistent.Tests:
glass_defaults_and_roundtripinstore.rsplus 5 tests inglass.rscovering 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
Blurredis 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
Defaults, light theme — sidebar + tab strip 75%, rest opaque
Defaults, dark theme
Custom tint (pink, 70% strength) + sidebar/tabs 60% + editor 30%, dark
Settings panel at ~12% — note text bleeds through
Context menu at ~17% — note text visible through menu
Settings UI — minimal Glass section
Advanced disclosure — per-surface toggles, tint and text options
Editor surface at 37%
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