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

Text in Tables not visible #23

Open
stevenjwest opened this issue Feb 10, 2025 · 1 comment
Open

Text in Tables not visible #23

stevenjwest opened this issue Feb 10, 2025 · 1 comment

Comments

@stevenjwest
Copy link

stevenjwest commented Feb 10, 2025

Thanks for creating an excellent dark theme that works across all of RStudio!

Ive noticed that text in some tables is not visible:

  • text in the Tools > Global Options > Pane Layout tab tables are not visible

Image

  • text in the Tools > Keyboard Shortcuts... table is not visible

Image

As you can see from the screenshot above, I have tried to modify the Mojave Dark.rstheme file, I have tried adding the following to the end of the file to adjust the colour of the text and/or background to Dialogs, Tables, and other CSS targets:

/* Fix for the Keyboard Shortcuts dialog table text color */
QTableView, QHeaderView::section {
    color: #000000 !important;
}

/* Force dark (black) text for any widget inside a dialog */
QDialog, QDialog * {
    color: #000000 !important;
}

/* Also explicitly target table views within dialogs */
QDialog QTableView, 
QDialog QTableView::item, 
QDialog QHeaderView::section,
QDialog QTableWidget, 
QDialog QTableWidget::item {
    color: #000000 !important;
}


/* Attempt to force a consistent text and background color for table-like widgets in dialogs */
QDialog QAbstractItemView,
QDialog QAbstractItemView::item,
QDialog QTableView,
QDialog QTableView::item,
QDialog QTreeView,
QDialog QTreeView::item,
QDialog QHeaderView::section {
    background-color: #f0f0f0 !important;  /* a light background */
    color: #000000 !important;             /* dark (black) text */
}


/* Force all dialogs (and their children) to use a consistent palette */
QDialog, QDialog * {
    background-color: #333333 !important;
    color: #ffffff !important;
}

None of these CSS inputs have resolved the issue.

I am running RStudio: Version 2024.12.0+467 (2024.12.0+467)

It seems RStudio uses very obscure names for components, which are targeted by the Mojave Dark.rstheme correctly.

Would it be possible to modify the rstheme file so these tables use a darker colour for the background and/or text to make them visible?

@gernophil
Copy link
Collaborator

I tried to fix these in the last two commits (04d2a3f and e52a7df). However, with every new release RStudio changes the IDs for the different elements. You can find those by using the "inspect element" option, but it's really a pain in the ass. I haven't found a good way other then modifying these individually for every new release, but I also don't find the time to keep track. Maybe you have a better way :).

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

No branches or pull requests

2 participants