Files
zed/crates/gpui_linux
Björn Harrtell 9935ef714a gpui: Expose the desktop font scaling factor on Linux (#66828)
Closes #66824

GPUI apps on Linux ignore the desktop's text scaling setting, because
GPUI reads other settings from the desktop portal but not
`text-scaling-factor`.

This reads it and exposes it as `App::text_scale_factor()`, with
`App::on_text_scale_factor_change` for updates. Apps apply it to their
own font sizes, using it in Zed is a follow-up.

It stays `1.0` on X11, where GNOME already folds the factor into
`Xft.dpi`.

Release Notes:

- [GPUI] Added `App::text_scale_factor` and
`App::on_text_scale_factor_change`, which report the desktop's text
scaling setting on Linux Wayland.

---------

Co-authored-by: Björn Harrtell <141030+bjornharrtell@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-11-23 09:21:35 +00:00
..