|
16 | 16 | ## Preferences
|
17 | 17 | -->
|
18 | 18 |
|
19 |
| -<!-- |
20 | 19 | ---
|
21 | 20 | ## Themes and Styling
|
22 |
| ---> |
| 21 | + |
| 22 | +### Improved Disabled Icons Generation <!-- https://github.com/eclipse-platform/eclipse.platform.swt/pull/1936 --> |
| 23 | +Up to now, disabled versions of icons usually were and had to be provided as explicit, separate image files. |
| 24 | +In case no such icon was provided, an algorithm in SWT was used to generate a disabled icon. However, that |
| 25 | +algorithm was very limited and produced hardly usable results. |
| 26 | + |
| 27 | +The algorithm in SWT was now improved such that results are by default equal to the disabled version of the |
| 28 | +icons that have explicitly been provided for the Eclipse Platform bundles. The pre-generated disabled icons |
| 29 | +have been replaced with the usage of on-the-fly generated disabled versions of the icons via the SWT algorithm. |
| 30 | +This particularly includes the removal of `disabledIcon` in `plugin.xml` files and programmatically setting the |
| 31 | +`disabledImageDescriptor` for `Actions`. |
| 32 | + |
| 33 | +In addition, the algorithm for the calculation of disabled versions of icons became exchangeable. The |
| 34 | +algorithm can be changed via the system property `org.eclipse.swt.image.disablement` with the |
| 35 | +following options: |
| 36 | +- `grayed` (default): produces a gray-scaled version of the icon, which is aligned with the |
| 37 | + existing, pre-generated disabled versions of icons for Eclipse bundles |
| 38 | +- `desaturated` (preview): produces a desaturated version of the icon, comparable to the |
| 39 | + `grayed` version but still keeping some color in it; the configuration of this option may be |
| 40 | + subject to change in future releases of Eclipse |
| 41 | +- `gtk`: produces an icon version that conforms with the default disablement algorithm of GTK |
| 42 | + |
| 43 | +The following screenshots demonstrate the different options. |
| 44 | + |
| 45 | +| Option | Example | |
| 46 | +| --- | --- | |
| 47 | +| `grayed` |  | |
| 48 | +| `desaturated` |  | |
| 49 | +| `gtk` |  | |
23 | 50 |
|
24 | 51 | <!--
|
25 | 52 | ---
|
|
0 commit comments