In the past couple of years the monitor pixel resolution has increased dramatically. Some years ago we were all happy with HD resolution or even Full HD resolution. Then "Retina" displays were promoted and now we reached a new all time height with 4 K monitors. Monitors with 4000 pixel in width.
So how do we write SWT code that runs on 800 x 600 AND also on 3840 x 2160 ?
While there are good strategies for scaling applications on Smartphones (iPhones and Android phones each using different approaches) there is no single good approach for desktops.
As an example think of a Login Dialog that you set to a fixed size of 400 x 200 pixels. Thats work great on a lot of screens but then the resolution goes up and the physical size stays the same and soon you need a magnifying glass to read it. Or Icons that you supplied with 16x16 pixels. Leaving them small or upscaling them is not an option.
So what is the solution here ?
This presentation will concentrate on desktop applications and covers all of the following aspects
- Examples of well-known applications that fail when asked to scale up to high resolution
- Which parts of SWT scales automatically and where do you need to add your own logic ?
- Frame and Dialog
- Layouts used for SWT views
- Layouts used for tables (header, column formatter)
- icons in buttons, menuitems, toolbars
- icon in various sizes
- icons using SVG
- Scaling the whole application
- navigation area
- close application button
- title bars
Most the proposed approaches are also available in Eclipse Riena (which we use as guinea pig) but can be achieved with any SWT application.