Skip to content

[Win32][Dark theme] Unfocused selection in Project Explorer is almost invisible #3658

Open

Description

@alejandroas400-arch

Environment

  • Eclipse IDE for Enterprise Java and Web Developers 2026-09 (4.41.0, build 20260903-0719)
  • Windows 11, x86_64
  • Java 25 (bundled Eclipse Adoptium JRE)
  • Theme: Dark (Preferences > General > Appearance)

Description

With the Dark theme on Windows, the selected item in the Project Explorer is almost
invisible when the tree does not have focus. It is only drawn as a thin outline,
with no background fill.

This is especially noticeable with "Link with Editor" enabled: when switching editor
tabs, the Project Explorer correctly expands, scrolls to and selects the active file,
but since focus stays in the editor, the selection is practically invisible.

Steps to reproduce

  1. On Windows, select the Dark theme and restart Eclipse.
  2. Open the Project Explorer and enable "Link with Editor".
  3. Open two or more files from different folders.
  4. Switch between the editor tabs.

Expected behavior

The selected item should remain clearly visible when the tree is not focused
(e.g. a filled background).

Actual behavior

The tree scrolls to the correct item, but it is only marked by a faint outline.
It is only clearly highlighted when the Project Explorer itself has focus.

Related

Same underlying problem as #1688 / #811.
It was addressed by PR #1690 (which introduced
org.eclipse.ui.workbench.SELECTED_CELL_BACKGROUND_NO_FOCUS), but that change
was later reverted in #1957, so the issue is present again in 4.41.

Things already tried (no effect)

  • Adding swt-selection-* properties to the Tree rule in e4-dark_win.css.
  • Setting -Dorg.eclipse.swt.internal.win32.useDarkModeExplorer=false after
    -vmargs in eclipse.ini.

Screenshot

Image Image

Activity

  1. fedejeanne commented on Oct 1, 2026

    @fedejeanne
    Member

    Thank you for reporting the issue.

    However, the 2 issues you mention as the possible cause (regression of)...

    ... could not have caused a regression because they are issues and not PRs / commits (no code changes).

    The PR that addressed those issues was...

    ... which was reverted in:

    So I doubt that's the cause. Maybe you meant it is the same cause?

    @alejandroas400-arch could you please investigate further and adapt the issue description?

    Thank you in advance

  2. vogella commented on Oct 1, 2026

    @vogella
    Contributor

    IIRC the selection color is set by the OS, but I have a look

  3. vogella commented on Oct 1, 2026

    @vogella
    Contributor

    The fix would be in SWT's win32 Tree.

    When useDarkModeExplorerTheme is on, SWT would need to fill the background itself for the unfocused selected state instead of relying on TREIS_SELECTEDNOTFOCUS. For trees using StyledCellLabelProvider would not be doable (like Project Explorer) for native drawn trees I don't think we can support that.

  4. changed the title [-][Win32][Dark theme] Unfocused selection in Project Explorer is almost invisible (regression of #1688?)[/-] [+][Win32][Dark theme] Unfocused selection in Project Explorer is almost invisible[/+] on Oct 1, 2026
  5. alejandroas400-arch commented on Oct 1, 2026

    @alejandroas400-arch
    Author

    Thanks @fedejeanne, you're right: it's not a regression but the same underlying
    cause, since eclipse-platform/eclipse.platform.ui#1690 was reverted in eclipse-platform/eclipse.platform.ui#1957. I've updated the title and description
    accordingly.

    Thanks @vogella for looking into it. For what it's worth, the Project Explorer is
    the case where this hurts most in daily use (with "Link with Editor" enabled), so
    a fix in SWT's win32 Tree for the unfocused selected state would be very welcome.

  6. self-assigned this
    on Oct 1, 2026
  7. vogella commented on Oct 1, 2026

    @vogella
    Contributor

    Thanks @vogella for looking into it. For what it's worth, the Project Explorer is the case where this hurts most in daily use (with "Link with Editor" enabled), so a fix in SWT's win32 Tree for the unfocused selected state would be very welcome.

    Do you have a setup to test a PR? Otherwise I could provide you a custom build IDE to test the change.

  8. alejandroas400-arch commented on Oct 1, 2026

    @alejandroas400-arch
    Author

    Thanks @vogella! I don't have a setup to build/test SWT PRs, so a custom build of
    the IDE would be great. I can test it on Windows 11 with the Dark theme and report
    back how the unfocused selection looks in the Project Explorer (with "Link with
    Editor" enabled) and in other trees.

  9. vogella commented on Oct 1, 2026

    @vogella
    Contributor

    Thanks @vogella! I don't have a setup to build/test SWT PRs, so a custom build of the IDE would be great.

    https://eclipsercp.de/download/products/eclipse-SDK-vogella-win32-x86_64.zip, it contains other unrelated fixes and some experimental code, building a SDK only with this patch was to much overhead on my side. Please post before and after screenshots, ensure you select the "Dark" theme via Window -> Apperance -> Theme and not one of the custom themes from https://github.com/vogellacompany/eclipse-themes

  10. alejandroas400-arch commented on Oct 1, 2026

    @alejandroas400-arch
    Author

    Thanks @vogella, I tested the custom build and it works perfectly.
    The unfocused selection in the Project Explorer is now clearly visible.

    Setup: Windows 11, Dark theme, "Link with Editor" enabled, focus in the editor.

    Before (Eclipse 4.41.0, 20260903-0719):

    Image

    After (custom build):

    Image

    Focused selection still looks as expected. Thanks for the quick fix!

  11. vogella commented on Oct 1, 2026

    @vogella
    Contributor

    Focused selection still looks as expected. Thanks for the quick fix!

    Thanks for the fast test, I plan to integrate the patch for the next release. You could install your missing plug-ins into the custom build via File -> Import -> From Existing Installation to continue to work with improved selection until them.

  12. alejandroas400-arch commented on Oct 1, 2026

    @alejandroas400-arch
    Author

    Great, thanks a lot @vogella! I'll try importing my plug-ins into the custom build
    in the meantime. Looking forward to the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions