Repository navigation
Conversation
Added a range check on the portal's accent-color channels. Bumped the version to 2.1.1.
2 tasks done
049er
marked this pull request as ready for review
November 6, 2026 07:03
Read the accent color asynchronously, with a two second timeout. Unwrapped the portal value however many variants wrap it.
049er
force-pushed
the
feat/linux-accent-color-changes
branch
from
November 6, 2026 07:12
b784857 to
ba85487
Compare
getAccentColor now returns null when the GTK theme has no accent color or the view is gone. Updated the plugin's doc comments.
049er
force-pushed
the
feat/linux-accent-color-changes
branch
from
November 6, 2026 10:02
ba85487 to
93eb631
Compare
Added DynamicColorPlugin.onAccentColorChanged, backed by the XDG portal's SettingChanged signal. DynamicColorBuilder now updates its color schemes when the accent color changes on Linux. The accent color example now shows changes. Added tests for the stream and the builder. Bumped the version to 2.2.0. Co-authored-by: shaakunuigurumi <188075782+shaakunuigurumi@users.noreply.github.com>
Passed org.freedesktop.appearance as arg0 to the SettingChanged subscription.
049er
force-pushed
the
feat/linux-accent-color-changes
branch
from
November 10, 2026 13:05
93eb631 to
a5e08da
Compare
This branch has not been deployed
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
Adds
DynamicColorPlugin.onAccentColorChanged, a stream of the accent color each time the XDG Desktop Portalaccent-colorsetting changes.DynamicColorBuilderlistens to it, so apps follow the system accent color without a restart. The stream is empty on all other platforms.This builds on #694 and the approach in #705 by @shaakunuigurumi. Compared with #705 it leaves
dynamic_color_testingunchanged soflutter pub getresolves, updatesDynamicColorBuilderand keeps a change that arrives during its first read, emits the GTK theme color when the setting becomes unset, and accepts the signal only from the portal and only for theorg.freedesktop.appearancenamespace.The branch includes #706. Those commits drop out of the diff once #706 is merged. If this merges first, the
2.1.1and2.2.0changelog sections can be folded into one.Tests
Unit tests for the stream and the builder.
flutter testpasses.Tested with Flutter 3.44.1 stable in a small app that uses the stream and the builder:
gsettingsarrive and the builder rebuilds each time.plasma-apply-colorschemearrive and the builder rebuilds. The portal sends each change twice and the stream emits it once. The portal reports the previous color after a change, so that is what arrives.getAccentColorstill returns the GTK theme color.With the engine shut down during a pending read and a change then arriving, the app logged an invalid object or crashed in 10 of 10 runs before the channel reference was added, and in 0 of 10 after.
The
Analyze Dart codecheck already fails onmainbecause of deprecation warnings. This change adds none.Not tested on other desktops, or on Windows and macOS beyond the unit tests that override the platform.
Issues
Part of #300
Checklist
CHANGELOG.mdContributed by Werner Scholtz, with thanks to KDAB.