Skip to content

fix(theme): apply desktop text scaling when D-Bus activated - #2045

Merged
l0gicgate merged 1 commit into
mainfrom
fix/2042-dbus-activation-text-size
Nov 3, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
fix/2042-dbus-activation-text-size

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

When Strata is D-Bus activated (--gapplication-service), it restarts GTK with GDK_DEBUG=no-portals so GTK cannot deadlock on the portal that is waiting for Strata (#1811). GTK's Wayland backend has no settings source other than the portal, so gtk-xft-dpi falls back to 96 DPI and the desktop's text-scaling-factor is lost. With a factor of 1.18, a 12 px text size rendered at 12 px instead of 14 px.

In that restarted process only, Strata now reads org.gnome.desktop.interface text-scaling-factor from the settings portal asynchronously, so the activating call cannot block on it. It sets gtk-xft-dpi from the factor and follows SettingChanged. The existing gtk-xft-dpi listeners then rescale the CSS root font and interface icons. If you set no-portals yourself, Strata leaves it alone.

The bug looked intermittent because it only shows when activation starts a new process. If a normally launched Strata is already running, it takes the request.

Visual evidence

N/A. Text size change; described above.

How to test

  1. Set a desktop text scaling factor other than 1 (for example gsettings set org.gnome.desktop.interface text-scaling-factor 1.25) and text_size = 12 in ~/.config/strata/settings.toml.
  2. Quit every Strata process, then run gdbus call --session --dest org.freedesktop.FileManager1 --object-path /org/freedesktop/FileManager1 --method org.freedesktop.FileManager1.ShowFolders "['file:///home/$USER']" "".
  3. Compare the window with one started with strata.
  4. Change the scaling factor while the activated window is open.

Expected result: The activated window's text matches the normally launched window and follows live changes to the scaling factor.

Related issue

Closes #2042

A service-activated Strata restarts GTK with portals disabled, and GTK's
Wayland backend then reports 96 DPI, so text ignored the desktop's
text-scaling-factor. Read the factor from the settings portal
asynchronously and follow its changes.

Fixes #2042
@github-actions github-actions Bot added the fix label Nov 3, 2026
@l0gicgate
l0gicgate merged commit 1d2e244 into main Nov 3, 2026
5 checks passed
@l0gicgate
l0gicgate deleted the fix/2042-dbus-activation-text-size branch November 3, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text size setting not applied when Strata is D-Bus activated (--gapplication-service)

1 participant