Skip to content

Set ui global body color on update.#1720

Open
dylanfprice wants to merge 1 commit into
pazz:masterfrom
dylanfprice:fix-theme-body
Open

Set ui global body color on update.#1720
dylanfprice wants to merge 1 commit into
pazz:masterfrom
dylanfprice:fix-theme-body

Conversation

@dylanfprice

Copy link
Copy Markdown
Contributor

I ran into a bug with my recently merged PR #1711. When switching the theme using the theme command, the global body color is not updated.

I didn't notice this until I switched to a dark theme and also changed my terminal background color to match. The background color of alot remained what it was in the light theme.

The issue is that the global body attribute is only set in the UI.__init__ constructor. I fixed it by setting the global body attribute again in the UI.update method.

Testing:
I did basic manual testing that the theme command now changes the background color. Doesn't look like there are any unit tests for the UI class so I didn't attempt to add any.

@pazz

pazz commented Jun 6, 2026

Copy link
Copy Markdown
Owner

does the above commit fix the issue for you?

@dylanfprice

Copy link
Copy Markdown
Contributor Author

@pazz yes

Here is where the global body colors are set in UI.__init__. I just did the same in UI.update.

@pazz

pazz commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants