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

Set dark theme to all grammars #163

Closed
PhaserEditor2D opened this issue Jul 6, 2018 · 3 comments
Closed

Set dark theme to all grammars #163

PhaserEditor2D opened this issue Jul 6, 2018 · 3 comments

Comments

@PhaserEditor2D
Copy link
Contributor

Hi,

Since Photon release Eclipse can use the Linux theme, so now users can have a dark Eclipse without selecting the dark Eclipse theme. But TM4E does not have a way to know if the OS theme is dark or not, so it shows by default the light theme associate to the grammars.

Right now I am using Adwaita dark Gnome theme, and I have to set manually a dark theme to all the TM4E grammars. It would be great if we have an option to set the default theme for all the grammars. Or maybe a better solution could be to set TM4E in dark mode without set Eclipse in dark mode.

@angelozerr
Copy link
Contributor

Eclipse IDE theme doesn't provide some category like this thme is a dark kind them. That's why I have hard coded that in https://github.com/eclipse/tm4e/blob/master/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/themes/AbstractThemeManager.java#L103

I think you should hard coded that to support your dark theme. Any PR are welcome!

@PhaserEditor2D
Copy link
Contributor Author

Hi @angelozerr

Let me explain myself better.

Linux desktop environments can be themeable. One popular theme is Adwaita Dark. If you set disable theming in Photon, it will show the current OS theme perfectly. If the OS theme is dark, Eclipse will look dark, but TM4E will show light themes, so we need a way in TM4E to put all the grammars in the dark mode.

Is like, in the method isDarkEclipseTheme() first we check for a custom TM4E preference, that could be "light", "dark" or "delegate". In case it is "delegate" (the default value), then you look for the E4 preferences. What do you think?

But you know, I just found a workaround. First, we set Eclipse in Dark mode, then we disable theming. It seems that TM4E will get the theme preferences as Dark, so it will show the dark theme of the grammars.

@sebthom
Copy link
Member

sebthom commented Feb 15, 2024

This should be solved with 0.10.0. Feel free to reopen if not.

@sebthom sebthom closed this as completed Feb 15, 2024
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

4 participants