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

Standard text editor ignores preferences for foreground color #869

Closed
peterdell opened this issue Apr 2, 2023 · 7 comments
Closed

Standard text editor ignores preferences for foreground color #869

peterdell opened this issue Apr 2, 2023 · 7 comments
Assignees
Milestone

Comments

@peterdell
Copy link

The following issue is present in Version: 2022-12 (4.26).
I have the dark theme active. When I create a plain text .txt file and put some there is is displayed in the light grey color configured in the preferences "General / Editors / Text Editors / Appearance and color options / Foreground color". But changing the color there has no effect. All the other color settings there (selection foreground and background, line numbers, .... ) work correctly. In this example I've set the foreground to purple:

image

@laeubi
Copy link
Contributor

laeubi commented Apr 2, 2023

The following issue is present in Version: 2022-12 (4.26).

Have you tried 2023-03 already?

@peterdell
Copy link
Author

Oh, sure, I should have verified there first. But I did now and yes, the issue is the same in https://download.eclipse.org/eclipse/downloads/drops4/R-4.27-202303020300/download.php?dropFile=eclipse-platform-4.27-win32-x86_64.zip.

@mickaelistria
Copy link
Contributor

I suspect the Theme engine incorrectly overrides the color here. Can you please try disable theming to verify the preference setting work?

@peterdell
Copy link
Author

You are right, if theming is disabled, the preferences setting is used.

@DenisUngemach
Copy link
Contributor

The color which overrides the preference is in the plugin org.eclipse.ui.themes in file e4-dark_partstyle.css the color: #AAAAAA line 59.
The override happens if the TextEditor gets focus.
With a breakpoint in StyledText in the method setForeground(Color color) it is possible to get the stack trace of the stylesheet override.

@laeubi laeubi transferred this issue from eclipse-platform/eclipse.platform.text Jun 28, 2023
@DenisUngemach
Copy link
Contributor

DenisUngemach commented Aug 18, 2023

Bug already existed: Dark Theme: Custom editor background color not properly applied
Related to this might be: Move Color options from Text Editors to the Colors and Fonts preference page

Further discussion about setForeground/setBackground: #306

vogella pushed a commit that referenced this issue Dec 1, 2023
Fix for #869

Change-Id: Ib739afdc301c4e37dcbbe37ef063ed32cb7f53d7
@BeckerWdf BeckerWdf added this to the 4.31 M1 milestone Dec 1, 2023
@BeckerWdf
Copy link
Contributor

this was fixed by #1036

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

5 participants