IMAGINARY / kiosk-browser

Hardened Web Browser with Kiosk-mode
Apache License 2.0
21 stars 2 forks source link

Add argument ("background-color" of type string) to specify the #55

Open malex984 opened 3 years ago

malex984 commented 3 years ago

Browser-Window' background (e.g. during any refresh) instead of hardcoded white.

NOTE: transparency support is enabled despite a problem in Color library

porst17 commented 3 years ago

Thanks for the contribution. I did a bit of cleanup and tried to make the handling of transparency easier and more consistent, especially when an alpha channel is present in the color but transparency is disabled.

Please test the feature/background-color branch. If everything is alright, I will merge it.

malex984 commented 3 years ago

Ok, it works. Note that --transparent does NOT lead to setting alpha=0 anymore. Now in order to get transparent window one has to specify alpha channel via background-color in addition to --transparent.

malex984 commented 3 years ago

Try: yarn start --background-color "#fff" -t vs. yarn start --background-color "#fff0" -t

porst17 commented 3 years ago

Looks good to me on macOS. If there is something suspicious, please post screenshots and describes what happens and what is supposed to happen.

malex984 commented 3 years ago

Now, (for me on linux) yarn start -t produces OPAQUE window and only --background-color "#fff0" -t leads to the requested transparent window.
Previously single -t was triggering transparency (by forcing alpha to be zero), right? My note is about this slight change of behavior...

porst17 commented 3 years ago

Alright, well spotted!

I changed the default background color from white to #FFF0 for that matter. Please check!

malex984 commented 3 years ago

Looks good!