eclipse-tm4e / tm4e

TextMate support in Eclipse IDE
https://projects.eclipse.org/projects/technology.tm4e
Eclipse Public License 2.0
94 stars 57 forks source link

fix: return correct value of "dark" property for default Eclipse theme #690

Closed joaodinissf closed 9 months ago

joaodinissf commented 9 months ago

On a new workspace, prefs.get(PreferenceConstants.E4_THEME_ID, null) will return null, because no theme changes have yet taken place.

In this case (i.e., when the default theme is active), it is sensible to default to the system's dark mode setting, instead of defaulting to the light mode.

sebthom commented 9 months ago

Dear João, first thanks for this PR, we really appreciate any contributions. While looking into the issue I found another problem with color themes and created PR #693 for this. This PR should also solve the issue you are facing by employing a background color brightness check. Please try the latest snapshot version and check if it now works for you.

joaodinissf commented 9 months ago

Your PR looks good to me--thanks for the quick feedback/fix!

The issue that led me to create this PR has indeed been fixed, so I am closing it now.