Skip to content

Allow to ignore explicitly defined disabled icons#4002

Open
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:ignore-disabled-icons
Open

Allow to ignore explicitly defined disabled icons#4002
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:ignore-disabled-icons

Conversation

@HeikoKlare
Copy link
Copy Markdown
Contributor

This change allows to ignore explicitly defined disabled icons (as SWT provides a proper way to do it on-the-fly since 2025-06) and enabled that behavior by default.

This is an extract of:

In that PR, no objections have been raised on always using the on-the-fly generation of disabled icons. I thus intend to merge this at the beginning of 4.41 development in case no objections are raised until then.

@HannesWell we had discussed the extraction of this rather non-controversial change offline. Maybe you want to have a quick a look.

Description

The algorithm for generating disabled icons on-the-fly has recently been enhanced. Most explicit disabled icons that have been embedded into bundles conform to what now can be generated on-the-fly. In addition, the algorithm is interchangeable, allowing custom stylings of disabled icons. However, when there are still bundles, such as extensions out of our control, that still explicitly define disabled icons, exchanging the algorithm for disabled icons will lead to inconsistent appearance as only the on-the-fly generated icons will adhere to that.

This change allows to ignore explicitly defined disabled icons, such that even if some bundles defined disabled icons, they will be ignored and on-the-fly generated disabled icons according to the selected algorithm will be used instead. An according preference that can be configured via the appearance tab is added.

How to test

The enhancement is configurable via preference, thus can be tested by enabling/disabling it:
image

As an example, this is what the main toolbar looks like with different configurations:

Existing

image

No pregenerated disabled icons

image

The algorithm for generating disabled icons on-the-fly has recently been
enhanced. Most explicit disabled icons that have been embedded into
bundles conform to what now can be generated on-the-fly. In addition,
the algorithm is interchangeable, allowing custom stylings of disabled
icons. However, when there are still bundles, such as extensions out of
own control, that still explicitly define disabled icons, exchanging the
algorithm for disabled icons will lead to inconsistent appearance as
only the on-the-fly generated icons will adhere to that.

This change allows to ignore explicitly defined disabled icons, such
that even if some bundles defined disabled icons, they will be ignored
and on-the-fly generated disabled icons according to the selected
algorithm will be used instead. An according preference that can be
configured via the appearance tab is added.
@HeikoKlare HeikoKlare force-pushed the ignore-disabled-icons branch from 29a2bec to b8ed790 Compare May 14, 2026 10:53
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

   867 files  ±0     867 suites  ±0   53m 42s ⏱️ - 8m 5s
 7 988 tests ±0   7 745 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 466 runs  ±0  19 811 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit b8ed790. ± Comparison against base commit b58e3b4.

@HeikoKlare HeikoKlare marked this pull request as ready for review May 14, 2026 12:00
Copy link
Copy Markdown
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I think this totally makes sense and helps to fade out explicit/dedicated disabled icons.

I just have one suggestions for their label/description.

Comment on lines +440 to +441
ViewsPreference_ignoreDisabledIcons = Ignore pre-generated disabled icons
ViewsPreference_ignoreDisabledIcons_tooltip = When enabled ignores pre-generated disabled icons in favor of generating consistently styled disabled icons on the fly
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about labling these icons as explicit disabled icons or dedicated disabled icons?

Suggested change
ViewsPreference_ignoreDisabledIcons = Ignore pre-generated disabled icons
ViewsPreference_ignoreDisabledIcons_tooltip = When enabled ignores pre-generated disabled icons in favor of generating consistently styled disabled icons on the fly
ViewsPreference_ignoreDisabledIcons = Ignore explicit disabled icons
ViewsPreference_ignoreDisabledIcons_tooltip = When enabled ignores explicit disabled icons in favor of generating consistently styled disabled icons on the fly

But I'm not sure if explicit could be read with other meaning.

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

Successfully merging this pull request may close these issues.

2 participants