Repository navigation
fix(theme): apply desktop text scaling when D-Bus activated - #2045
Merged
Merged
Conversation
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
5 tasks
wmfeht
pushed a commit
to wmfeht/strata-feature-map
that referenced
this pull request
Nov 3, 2026
… 1d2e244 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23A9FMdmsZYjsqdLwDf9
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.
Description
When Strata is D-Bus activated (
--gapplication-service), it restarts GTK withGDK_DEBUG=no-portalsso GTK cannot deadlock on the portal that is waiting for Strata (#1811). GTK's Wayland backend has no settings source other than the portal, sogtk-xft-dpifalls back to 96 DPI and the desktop'stext-scaling-factoris 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-factorfrom the settings portal asynchronously, so the activating call cannot block on it. It setsgtk-xft-dpifrom the factor and followsSettingChanged. The existinggtk-xft-dpilisteners then rescale the CSS root font and interface icons. If you setno-portalsyourself, 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
gsettings set org.gnome.desktop.interface text-scaling-factor 1.25) andtext_size = 12in~/.config/strata/settings.toml.gdbus call --session --dest org.freedesktop.FileManager1 --object-path /org/freedesktop/FileManager1 --method org.freedesktop.FileManager1.ShowFolders "['file:///home/$USER']" "".strata.Expected result: The activated window's text matches the normally launched window and follows live changes to the scaling factor.
Related issue
Closes #2042