This commit introduces vector-drawn Icon implementations for the icons used in
the window system's Windows 8 Look-and-Feel. Specifically, this replaces most of
the bitmap icons that are used on Windows from the o.n.swing.tabcontrol and
openide.awt modules.

An abstract class VectorIcon is added in the UI Utilities Module (openide.awt)
as a general-purpose starting point for creating new vector icons. It handles
and documents a number of tricky adjustments that are needed to draw icons that
appear sharp on HiDPI screens. This class can be used to implement HiDPI icons
in other LAFs at a later time, e.g. for MacOS retina displays.

A small utility, VectorIconTester, was written to preview new icons at multiple
resolutions, as well as to compare them with existing bitmap icons. This is less
polished code that is nevertheless included here, in tabcontrol's test package.
A screenshot of its output, as well as screenshots of the NetBeans IDE before
and after the patch on various scaling levels, are attached to the JIRA ticket
for NETBEANS-1238, and attached in this pull request below as well.

To test this patch, use Windows 10 on Java 9 or Java 10, and use the workaround
in https://issues.apache.org/jira/browse/NETBEANS-1227 to tell Windows to let
NetBeans manage DPI scaling on its own.

NetBeans screenshots before and after patch:
![netbeans-1238 before 
patch](https://user-images.githubusercontent.com/886243/45390064-dfb62b80-b5eb-11e8-8d15-3f91739c7eb2.png)
![netbeans-1238 after 
patch](https://user-images.githubusercontent.com/886243/45390063-dfb62b80-b5eb-11e8-8dcc-45fc4ea08879.png)

Output of the VectorIconTest, showing the old Windows icons next to the new 
scalalble ones, as well as corresponding icons on other LAFs that might have to 
be vectorized in the future (e.g. on MacOS):
![vectoricontester 
output](https://user-images.githubusercontent.com/886243/45390094-f492bf00-b5eb-11e8-93a0-8d2ab5606697.png)



[ Full content available at: 
https://github.com/apache/incubator-netbeans/pull/859 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to