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

Support Dark Theme #44

Open
gnl42 opened this issue Jan 29, 2023 · 5 comments
Open

Support Dark Theme #44

gnl42 opened this issue Jan 29, 2023 · 5 comments

Comments

@gnl42
Copy link
Contributor

gnl42 commented Jan 29, 2023

Mylyn doesn't play well with Dark Theme.
It uses hard coded colors that are close to impossible to read in Dark Mode.

An example is TaskScalingHyperlink which uses CommonColors.HYPERLINK_WIDGET

`public class CommonColors {

    public static final Color HYPERLINK_WIDGET = new Color(Display.getDefault(), 12, 81, 172);

    public static final Color TEXT_QUOTED = new Color(Display.getDefault(), 38, 86, 145);

`

image
(It's worse on my monitor)

@wimjongman
Copy link
Member

Patches are welcome.

@BeckerFrank
Copy link
Contributor

What is with the other Color Definitions?
We also have Class org.eclipse.mylyn.internal.context.ui.ColorMap.

@gnl42
Copy link
Contributor Author

gnl42 commented Feb 14, 2023

And org.eclipse.mylyn.internal.commons.ui.E4ThemeColor which tries to parse #org-eclipse-ui-workbench-DARK_BACKGROUND as a RGB value:

java.lang.NumberFormatException: For input string: "or" under radix 16 at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Integer.parseInt(Integer.java:668) at org.eclipse.mylyn.internal.commons.ui.E4ThemeColor.getRGBFromCssString(E4ThemeColor.java:57) at org.eclipse.mylyn.commons.ui.GradientColors.getRGBFromTheme(GradientColors.java:211)

"Fixed" by #298

@wimjongman wimjongman added this to the 3.26.1 milestone May 3, 2023
@ruspl-afed ruspl-afed removed this from the 3.26.1 milestone Jun 3, 2023
@gnl42
Copy link
Contributor Author

gnl42 commented Nov 7, 2023

I could use suggestions/pointers on how to go about doing this.

I have no experience with SWT UI programming. Trying to make sense of the various articles on Eclipse themes but unsure how to actually apply them..

Are custom colours really needed? Or are Eclipse defaults good enough?

@wimjongman
Copy link
Member

Are custom colours really needed? Or are Eclipse defaults good enough?

When possible, Eclipse defaults would be the way to go.

https://www.vogella.com/tutorials/Eclipse4CSS/article.html contains many clues, but you probably already found it.

Theming is based on CSS, and when the plugin spy is installed, you can use CTRL+ALT+SHIFT+F6 to see how the component is styled.

Please ask specific questions and I will help.

BeckerFrank pushed a commit that referenced this issue Nov 21, 2023
Release pipeline releases nexus staging repository automatically
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

4 participants