Native look and feel
Nowadays, one can find plenty of native desktop applications with semi-transparent background or with round corners. Can we achieve such fancy look with NW.js
? Sure we can! First, we shall edit our application manifest file:
./package.json
... "window": { "frame": false, "transparent": true, ... }, ...
By setting the frame field to false
, we instruct NW.js
to not show the window frame, but its contents. Fortunately, we have already implemented custom windowing controls as the default ones will not be available anymore. With a transparent field, we remove the opacity of the application window. To see it in action, we edit the CSS definitions module:
./assets/css/Base/definitions.css
:root { --titlebar-bg-color: rgba(45, 45, 45, 0.7); --titlebar-fg-color: #dcdcdc; --dirlist- bg-color: rgba(222, 222, 222, 0.9); --dirlist-fg-color: #636363; --filelist-bg-color: rgba(249, 249, 249, 0.9); --filelist-fg-color: #333341; --dirlist-w: 250px...