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

Cursor extremely difficult to see on dark theme #2685

Open
cddesja opened this issue Apr 23, 2018 · 11 comments
Open

Cursor extremely difficult to see on dark theme #2685

cddesja opened this issue Apr 23, 2018 · 11 comments

Comments

@cddesja
Copy link

cddesja commented Apr 23, 2018

System details

RStudio Edition : Desktop
RStudio Version :  1.1.447
OS Version      :  macOS 10.13.4 
R Version       :  3.4.4

Steps to reproduce the problem

Select a dark theme, such as Dracula.

Describe the problem in detail

The cursor when hovering over the code is black and extremely difficult to locate. At least for, dark themes, are unusable. This is likely a function of the high res retina display I have.

Describe the behavior you expected

VS Code, e.g., when handling a dark theme, turns the cursor to white. Is it possible to do this with RStudio?

See the mouse over the D in on line 145 in the red rectangle in RStudio:
rstudio

See the mouse over the D in on line 145 in the red rectangle in VS code:
vscode

Please ignore the size of the cursors as they are actually the same in both apps but for whatever reason appears larger when taking a screenshot for VS Code.

@ronblum
Copy link
Contributor

ronblum commented Apr 24, 2018

@cddesja That is a good point. We'll review it during ongoing development of RStudio.

@cddesja
Copy link
Author

cddesja commented May 7, 2018

I can verify that this doesn't happen with the the dark themes on Windows. The cursor is white. So, this is probably just a Mac (and possibly Linux) issue.

@javierluraschi
Copy link
Contributor

Looks like this has been the default cursor behavior since 1.0:

screen shot 2018-06-11 at 3 08 26 pm

@samhinshaw
Copy link

I mentioned this over on support.rstudio.com last year, but this bug cropped up in two Electron-based macOS apps, Hyper and VS Code.

I was unable to implement the workaround previously, but it seems to be working with the new rendering engine in RStudio 1.2. The workaround is to specify your own text cursor with the following css:

* {
  cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=')
      5 8,
    text;
}

Note: to edit a theme's CSS in your compiled RStudio distribution, open Applications and right-click on RStudio -> [Show Package Contents]. Then Navigate to Contents/Resources/www/rstudio and edit the <string>.cache.css file corresponding to the theme you use... this might involve some guesswork.

Perhaps this could be injected into compiled themes' CSS for macOS distributions of RStudio? I am not sure how it would affect other platforms. Additionally, the original fix I found had multiple DPI options which did not seem to work properly for RStudio.

@gtritchie gtritchie self-assigned this Jun 26, 2018
@cddesja
Copy link
Author

cddesja commented Jun 26, 2018

@samhinshaw, thanks for the work around.

Outside of literally guessing which <string>.cache.css goes with which theme, does anyone have an idea of how to identify a theme's corresponding CSS? For example, if I wanted to do this with the Dracula theme, which CSS would I change?

@samhinshaw
Copy link

@cddesja You need to be able to use the rendering engine's dev tools to inspect the layout. This will tell you which files the styles are coming from. However, the ability to do so is currently disabled: #2133

You could probably check with RStudio 1.1 or wait until Qt 5.11 is merged and try a daily build.

@gtritchie gtritchie assigned MariaSemple and unassigned gtritchie Jul 17, 2018
@gtritchie
Copy link
Member

@MariaSemple this is firmly in your territory. Would be a nice improvement to consider on macOS.

@kevinushey kevinushey removed the low label Nov 14, 2018
@trashbirdecology
Copy link

I would love to see this resolved, if it hasn't already been done.

@GreenGrassBlueOcean
Copy link

GreenGrassBlueOcean commented Nov 5, 2020

Hi I am currently using Rstudio 1.4.904 and this is still a huge issue. Especially when the cursor is in selection mode e,g, like: I.
I am using Rstudio theme: Mordern, Editor Theme: idle fingers, OS = Windows

@mikebessuille mikebessuille added this to the 2023 milestone Jun 10, 2022
@mikebessuille mikebessuille modified the milestones: 2023, 2024 Jul 4, 2022
@svalvaro
Copy link

svalvaro commented Feb 2, 2023

Any updates on this? Still an annoying behavior after 5 years. It's also applicable to Rstudio Workbench.

@GreenGrassBlueOcean
Copy link

yes would be wonderful if this would be fixed!, so annoying to look for the cursor in the help and build panes of rstudio

@ronblum ronblum modified the milestones: Backlog-3, Later Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests