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
Selecting a dark editor theme does not switch GUI elements to dark mode and displays some illegible text #11176
Comments
|
Just to add that I am experience the same issue on windows 10. I had filed a post on rstudio's community page here. |
|
Does changing the RStudio theme: in Tools -> Global Options... -> Appearance make a difference? (E.g. try changing it to "Sky" and back to "Modern") Or, does switching to a light theme and then later back to a dark theme make a difference? (Or, do you see some "dark" themes work as expected, while others do not?) |
|
Changing between "Modern" and "Sky" or between light and dark themes does not solve the problem. It seems that all the light themes are displayed correctly, but all the dark themes not. It's not just that the GUI does not switch to dark mode, but also the pane that displays "Files", "Help", etc shows text really strange. For example the blue hyperlinks (see picture above), but also in the help function (see below). No problem with the light themes. |
|
I experience exactly the same. Temporary solution is that you right click on file names, select Inspect element, and then you set a different color for the filenames. Although, if you re-enter RStudio the issue is still not solved. |
1 similar comment
|
I experience exactly the same. Temporary solution is that you right click on file names, select Inspect element, and then you set a different color for the filenames. Although, if you re-enter RStudio the issue is still not solved. |
|
I just found out a "hack" that solves the problem, and which might help developers to understand the bug. It seems that what you do in a previous installation of R Studio (even after uninstalling) affects what happens in a new installation of R Studio. Here are the steps that I can reproduce to fix the problem:
Now everything looks the way it should. I can also uninstall and install R Studio 2022.02.2 Build 485 again and it remains intact. But as soon as you try to switch back and forth between themes, the dark theme is corrupted again and it remains corrupted even after uninstalling and reinstalling. However, when carrying out above steps, it is fixed again. I hope this helps developers to understand the cause of the problem and others to temporarily fix the issue. |
|
Marking for triage since it looks like this is a bug that could affect anyone updating from PT to SW after release. |
|
I have the same issue on a freshly installed windows 10, no previous installations of Rstudio on the machine: https://community.rstudio.com/t/dark-themes-are-not-being-fully-applied-in-rstudio/136977/2 |
|
I had this too when trying with a version older than 2021.09.0 Build 351 but it worked with 2021.09.0 Build 351 in my case. |
|
I still haven't been able to reproduce this locally. If you're still having trouble, can you please share the output of: while you have a dark theme active? It's possible that RStudio is incorrectly inferring that a "dark" theme is actually a "light" theme. |
|
I'd also be curious to know whether usage of |
|
Finally, if you right click somewhere in the IDE surface and click Inspect Element in the context menu, you should be able to view the DOM used by RStudio. Do you see the "rstudio-themes-dark-menus" class applied on the body element? Or, the "rstudio-themes-dark" class applied to the associated div (see highlight in picture)? |
|
Can't answer for the OP, but in my case, when using the "Express" theme (a dark theme which comes with RStudio), I have the following DOM: See also here |
|
@werkstattcodes, thank you! Your output in gadenbuie/rsthemes#86 (comment) also confirms that RStudio is incorrectly concluding the theme is a light theme (ie: not dark). Do you see the same behavior for RStudio's built-in dark themes? Could you also share a diagnostics report? Do you know if the installed theme file has a comment header with the contents: (this is what RStudio reads to infer if a theme is dark) Finally, does resetting RStudio's state make a difference? See https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State for more details. In particular, you need to rename (or remove) the folder located at: |
|
Below the requested output before and after working correctly and the diagnostic report. I have never used Output before it "breaks"This is the output when R Studio is correctly displaying a built-in dark theme (using the above hack).
Output after it "breaks"This is the output after I switch to another theme and than back to the same theme as above:
|
|
Thanks! There are a lot of errors in the logs of the form:
Can you please share the contents of that file? Also, do you recall ever intentionally modifying the installed theme files, or anything like that? |
|
I did a fresh installation of Windows 11 (formating all drives) and then installed R Studio. The first thing I did was to change the theme and then the problem already happened, so without any other modifications in R Studio. I am also dual booting with Linux Mint where it works fine. Here the file: |
|
Thanks. I have some idea as to what the problem could be and will take a look tomorrow. |
|
@ptschanz, we have a candidate fix for this coming in the next daily builds. If you have time, would you be able to test the next builds available at https://dailies.rstudio.com/? (Please wait until build 442 is available.) Thanks! |
|
@kevinushey thanks for your quick reponse and fix to the raised issue! After installation of build 442, the theme is first display incorrectly (the same as before), but after switching themes at least once, everything is displayed correctly (GUI panels dark, no dark blue hyperlinks anymore, no blurry text in help pane). I can now switch back and forth between themes and all is perfect! |
|
@ptschanz That's great news; thank you for taking the time to test and report back! |
|
I have the same issue on a newly installed Windows 10 system. Changing between themes doesn't solve it. |







System details
Steps to reproduce the problem
Describe the problem in detail
After a fresh installation of Windows 11 and the newest R Studio version, I can only switch to a dark editor theme, but the GUI elements stay in the light theme. Also, the text in the "Files" pane can hardly be read.
I tried reinstalling several times, but it didn't help.
Describe the behavior you expected
The GUI elements should also switch to dark mode, like this:

The text was updated successfully, but these errors were encountered: