Skip to content

Commit bcbf285

Browse files
committed
Add N&N for improved disabled icons
This contributes an N&N informing about the icon disablement algorithm in SWT being improved and made configurable and the according removal of the usage of pre-generated disabled icons. See eclipse-platform/eclipse.platform.swt#1936
1 parent 3b3a84f commit bcbf285

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed
4.7 KB
Loading
4 KB
Loading
5.17 KB
Loading

news/4.36/platform.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,52 @@ <h2>Preferences </h2>
100100
<h2>Themes and Styling </h2>
101101
</td>
102102
</tr>
103+
<tr id="improvedDisabledIcons"> <!-- https://github.com/eclipse-platform/eclipse.platform.swt/pull/1936 -->
104+
<td class="title">Improved Disabled Icons Generation</td>
105+
<td class="content">
106+
<p>
107+
Up to now, disabled versions of icons usually were and had to be provided as explicit, separate image files.
108+
In case no such icon was provided, an algorithm in SWT was used to generate a disabled icon. However, that
109+
algorithm was very limited and produced hardly usable results.
110+
</p>
111+
<p>
112+
The algorithm in SWT was now improved such that results are by default equal to the disabled version of the
113+
icons that have explicitly been provided for the Eclipse Platform bundles. In consequence, those
114+
pre-generated disabled icons are replaced with the usage of on-the-fly generated disabled versions of the
115+
icons via the SWT algorithm.
116+
This particularly includes the removal of <code>disabledIcon</code> in <code>plugin.xml</code> files and
117+
setting the <code>disabledImageDescriptor</code> within code for <code>Actions</code>.
118+
</p>
119+
<p>
120+
In addition, the algorithm for the calculation of disabled versions of icons became exchangeable. The
121+
algorithm can be changed via the system property <code>org.eclipse.swt.image.disablement</code> with the
122+
following options:
123+
</p>
124+
<ul>
125+
<li><code>grayed</code> (default): produces a gray-scaled version of the icon, which is aligned with the
126+
existing, pre-generated disabled versions of icons for Eclipse bundles</li>
127+
<li><code>gtk</code>: produces an icon version that conforms with the default disablement algorithm of GTK
128+
</li>
129+
<li><code>desaturated</code> (preview): produces a desaturated version of the icon, comparable to the
130+
<code>grayed</code> version but still keeping some color in it; the configuration of this option may be
131+
subject to change in future releases of Eclipse</li>
132+
</ul>
133+
<p>
134+
The following screenshots show the different options. The screenshot for the <code>gtk</code>
135+
</p>
136+
<p>
137+
<img src="images/disabled_icons_grayed.png" alt="Disablement option 'grayed'" /> &nbsp<code>grayed</code>
138+
(default)
139+
</p>
140+
<p>
141+
<img src="images/disabled_icons_gtk.png" alt="Disablement option 'gtk'" /> &nbsp<code>gtk</code>
142+
</p>
143+
<p>
144+
<img src="images/disabled_icons_desaturated.png" alt="Disablement option 'desaturated'" />
145+
&nbsp<code>desaturated</code> (preview)
146+
</p>
147+
</td>
148+
</tr>
103149
<!-- ******************* End of Themes and Styling ************************************* -->
104150

105151
<!-- ******************* General Updates ************************************* -->

0 commit comments

Comments
 (0)