Repository navigation
Desktop: text, links and bullets take the new theme's colours after a switch (#436) - #496
Open
MopigamesYT wants to merge 2 commits into
Open
MopigamesYT wants to merge 2 commits into
MopigamesYT wants to merge 2 commits into
Conversation
Member
Author
|
Heads-up from testing the open PRs merged together: #477 changes |
tpm28
approved these changes
Nov 18, 2026
Collaborator
|
ci error |
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.
Closes #436
Summary
After switching themes (theme file → theme file, light ↔ dark, accent change), markdown text, bullets, links and similar could keep the previous theme's colours while the sidebar and background were already new.
Screenshots
None: the bug is intermittent and I did not reproduce it on VM 111; the regression test reproduces it (fails before the fix, passes after).
Technical details
repaintrecolours by mapping each old colour found in the window to the new one. That map cannot tell apart two tokens that shared one colour (first wins), and ignores colours that are not exactly a token. Markdown blocks (flowText) build their text, bullets and link rules with colours baked in, so they kept the old ones.flowText.repaint(internal/ui/theming.go) now also marks the block as stale (paintedWidth = -1), so the next refresh lays it out again from the colours now in use.internal/ui/theme_switch_colours_test.go(text and accent the same colour before the switch).third_party/fyne/internal/cache/theme.go) holds only per-object theme scopes, not resolved colours.themeChanged/repaintsignature (repaint(changed, fontsChanged)) intheming.go, so a small textual conflict is likely nearrepaint; the change here is only insideflowText.repaintand does not undo its cache handling. With Desktop: nothing redraws when idle, cheaper theme changes (#474) #489, a reflow here costs no re-shaping sincecutis rebuilt from the kept measures.Assisted-by: Claude Sonnet 5.5 low
🤖 Generated with Claude Code