Monday, July 19, 2021

Glimmer DSL for SWT System Tray

Glimmer DSL for SWT 4.20.5.0 has shipped with explicit system tray support (was implicitly supported via SWT before), greatly simplifying the addition of a tray item to a desktop app.

The Hello, Tray Item! sample demonstrates the details.


Hello, Tray Item! Icon [white circles on a black square] (clicking or right clicking brings up a menu that allows showing About dialog, hiding and showing app, and exiting completely)



Hello, Tray Item! App



Hello, Tray Item! About Message Box


You simply nest `tray_item {}` under `shell {}`, set an `image` property (and `tool_tip_text` optionally), and nest a `menu` with `menu_item` instances underneath. It is as simple as you would think of it visually. One last thing to note about the illustrated sample is that the `shell` took SWT styles of :on_top (stay on top of other windows) and :shell_trim (default). This ensures that when showing the application after hiding it through the system tray item, it shows up on top of all other windows.

Otherwise, Glimmer DSL for SWT 4.20.6.0 and 4.20.7.0 brought some improvements to the brand new early alpha support for animations via the `animation` keyword (and its nested `frame` keyword), specifically the ability to data-bind its values, and to run multiple parallel animations on the same canvas (parallel animations were supported before as one per canvas).



Hello, Canvas Animation!




Hello, Canvas Animation Multi!



Happy Glimmering!

No comments: