Skip to content

Configurably improve disabled icons appearance#3760

Open
HeikoKlare wants to merge 4 commits intoeclipse-platform:masterfrom
HeikoKlare:configure-disabled-icons
Open

Configurably improve disabled icons appearance#3760
HeikoKlare wants to merge 4 commits intoeclipse-platform:masterfrom
HeikoKlare:configure-disabled-icons

Conversation

@HeikoKlare
Copy link
Contributor

This consists of two subsequent changes:

  • Allow to ignore explicitly defined disabled icons (as SWT provides a proper way to do it on-the-fly since 2025-06)
  • Allow to use a different/enhanced algorithm for calculating disabled icons (based on desaturation rather than grayscaling).

The changes are put into separate commits and could be processed independently, but are mostly useful together, thus I put them into a single PR.

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 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.

This also adds a preference which enables the use of desaturated disabled icons, which replaces the existing algorithm to create grayscaled version with an algorithm that generates a desaturated version.

This alternative algorithm for disabled icons has been discussed and agreed on here:

How to test

Both enhancements are configurable via preferences, thus can be tested by enabling/disabling them:
image

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

Existing

image

No pregenerated disabled icons

image

Desaturated disabled icons

image

Feedback

Feedback on the proposal is welcome as always. We can of course decide if we want to have both/either of these options enabled by default or not. Using the on-the-fly algorithm for calculating disabled icons by default makes sense to me to ensure a unified look and feel of them. Whether the alternative algorithm (desaturated vs. grayscaled) should be default may be more up to individual preference. But note that the new algorithm better aligns with common disablement visualizations used nowadays by Windows and GTK.

@HannesWell pinging you for feedback as we had already discussed about adding such options after we had implemented the new algorithm

@BeckerWdf pinging you for feedback as an expert on UX topics and as you were also involved into the discussion about the disabled icon look & feel back then

@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Mar 4, 2026

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 64de684ac80a89d24838e68494fe46fc1f99358d Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 4 Mar 2026 19:53:43 +0000
Subject: [PATCH] Version bump(s) for 4.40 stream


diff --git a/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
index 22e2c1d34b..9fff0e1559 100644
--- a/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.jface.tests
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.5.100.qualifier
 Automatic-Module-Name: org.eclipse.jface.tests
 Bundle-RequiredExecutionEnvironment: JavaSE-21
 Require-Bundle: org.eclipse.jface,
-- 
2.53.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test Results

 3 024 files  + 9   3 024 suites  +9   2h 15m 2s ⏱️ + 10m 49s
 8 234 tests ± 0   7 986 ✅ + 1  248 💤 ±0  0 ❌  - 1 
23 526 runs  +26  22 735 ✅ +24  791 💤 +3  0 ❌  - 1 

Results for commit 1c65693. ± Comparison against base commit e6d3cbf.

♻️ This comment has been updated with latest results.

HeikoKlare and others added 3 commits March 4, 2026 20:49
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.
This adds a preference which enables the use of desaturated disabled
icons, which replaces the existing algorithm to create grayscaled
version with an algorithm that generates a desaturated version.
@HeikoKlare HeikoKlare force-pushed the configure-disabled-icons branch from 38603eb to 897d56a Compare March 4, 2026 19:49
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