Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New terminal does not handle theme change event. #1230

Closed
zadjii-msft opened this issue Jun 12, 2019 · 23 comments
Closed

New terminal does not handle theme change event. #1230

zadjii-msft opened this issue Jun 12, 2019 · 23 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase Resolution-Fix-Available It's available in an Insiders build or a release

Comments

@zadjii-msft
Copy link
Member

From MSFT:21424988
I have to restart the new terminal to see the effects of changing between light and dark windows theme.
You can see at the attached screenshot that the tabs haven't changed it's colors after I changed from Dark to Light theme. UWP apps are supposed to do that by default.

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Jun 12, 2019
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Jun 12, 2019
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 12, 2019
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 12, 2019
@DHowett-MSFT
Copy link
Contributor

This one is interesting. We could probably tackle it as part of #1125, but maybe we want to keep it separate?

@Aarklendoia
Copy link

The window border as well as the area with the Minimize, Maximize and Close buttons does not take the color of the theme (remains white despite the dark theme).

@Aarklendoia
Copy link

image

@Mercurial
Copy link

same here , anyone know how to fix this?

@DHowett-MSFT
Copy link
Contributor

To be blunt: somebody needs to write the code to do this. If we do it, it will come out whenever we are done. If we don’t, we will get back to it eventually.

@AnuthaDev
Copy link
Contributor

@DHowett May I work on it??

@DHowett
Copy link
Member

DHowett commented Jun 19, 2020

@AnuthaDev you certainly may 😄

@StefanScherer
Copy link

Yes please change the window title according to the dark/light theme in Windows. I also have to close and re-open the terminal to fully switch. The theme itself I change the settings.json at the moment, configuring two themes, one for dark, another for light and let it auto-switch according to Windows theme would be even better.

wt-toggle-theme-title-bar-issue

@mdtauk
Copy link

mdtauk commented Jul 31, 2020

Not sure if this is a XAML Island thing, but if you are using Xaml ThemeResources - they should update and refresh as the RequestedTheme changes.

@zadjii-msft
Copy link
Member Author

This is almost certainly Islands related. I'm not sure what window message is sent when the theme changes, but there almost certainly should be one...

@AnuthaDev
Copy link
Contributor

@zadjii-msft I think it's this one: WM_SETTINGCHANGE

@Robinzon100
Copy link

Yes please change the window title according to the dark/light theme in Windows. I also have to close and re-open the terminal to fully switch. The theme itself I change the settings.json at the moment, configuring two themes, one for dark, another for light and let it auto-switch according to Windows theme would be even better.

wt-toggle-theme-title-bar-issue

can you share how you did this?

@StefanScherer
Copy link

StefanScherer commented Nov 30, 2020

@Robinzon100 my theme switching is done in this bash script t, it changes the HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -> SystemUsesLightTheme and AppsUseLightTheme and updates the $WINHOME/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json

I would prefer to just configure a dark and light theme in the terminal and let it update automatically depending on the system theme setting in the registry.

(Update: fixed the link to my script)

@TBBle
Copy link

TBBle commented Nov 30, 2020

I would guess the t command is doing something like

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force

(but using 1 if the current value is 0) and also JSON-editing settings.json for Terminal to change the theme, which WT will immediately apply when it notices the file change.

Edit: Beat me to it by 30 seconds.

@olegKusov
Copy link

Hi , is there any update on fix? How can we get theme auto switching and config for default light and default dark themes ?

@zadjii-msft
Copy link
Member Author

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@olegKusov
Copy link

olegKusov commented Jun 10, 2021

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

Hi, thanks for feedback. Is there any dificulties? How can we help? Because for me automatic theme switching is now the basic OS feature. Windows starts to look very outdated after MacOS where I use automatic dark theme in terminal. And issue created 3 years ago. Do you need some help?

@j4james
Copy link
Collaborator

j4james commented Jun 10, 2021

Do you need some help?

Given that the issue is labelled "Help Wanted", I think it's safe to assume that's a yes. 😉

If you'd like to help, let the team know that you want to work on the feature, and explain briefly how you intend to implement it. You can find more information in the Contributor's Guide.

@zadjii-msft
Copy link
Member Author

Yep, there's no real reason we haven't done this other than simply resourcing. We've only got so many devs, and something like 10,000 issues that have been active since the Terminal was first released 😄

@JasonWei512
Copy link

JasonWei512 commented Jun 22, 2021

Terminal.on.Win11.mp4

For some reason Windows Terminal 1.8.1521.0 follows system theme on Windows 11, but not on Windows 10.

sonofjon added a commit to sonofjon/config-wsl that referenced this issue Sep 6, 2021
There is a bug, so this does not work yet (as of v1.11):
microsoft/terminal#1230.
@zadjii-msft
Copy link
Member Author

Huh, that's totally right, this did seemingly get fixed in Windows 11. That seems to me to imply that there was actually just an OS bug that was the actual root cause for this one. I'm gonna close this one out as external - there's maybe something that we could do to fix this on Windows 10, but the fact that an OS fix remedied this makes me think that would be a futile effort.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jan 4, 2022
@zadjii-msft zadjii-msft added Resolution-External For issues that are outside this codebase Resolution-Fix-Available It's available in an Insiders build or a release and removed Needs-Tag-Fix Doesn't match tag requirements labels Jan 4, 2022
@j4james
Copy link
Collaborator

j4james commented Jan 4, 2022

@zadjii-msft I actually have a fix for this on Windows 10 which is not that complicated. Is it worth submitting a PR, or would you rather just leave it as is?

@zadjii-msft
Copy link
Member Author

@j4james If you have a fix in hand then go for it! I'm maybe being a little aggressive in closing out some of the older things in the backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase Resolution-Fix-Available It's available in an Insiders build or a release
Projects
None yet
Development

No branches or pull requests