AsteroidOS / asteroid-launcher

AsteroidOS launcher and Wayland compositor based on Qt5, QML and QtWayland via Lipstick.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Round windows border smoothing

FlorentRevest opened this issue · comments

Watches with round screens enable a shader on windows to hide the area that is beyond the screen size (useful when minimizing/closing the window). This shader softens the border of those windows using a smoothstep https://github.com/AsteroidOS/asteroid-launcher/blob/master/qml/compositor/WindowWrapperBase.qml#L72

This smoothstep has two side effects:

  • in all circumstances, the border of the circular screen is antialiased which makes the UI much more pleasant than without this shader (otherwise the round screen is pixelated)
  • when a window is opened, the smoothstep leaves some pixels transparent which makes the background (asteroid-launcher) visible. this is especially a problem when shutting down the OS since the shutting down screen is black and the transparent borders makes a kind of unwanted "glow" effect.

The GLSL of the shader should be adapted to get the best of both worlds (antialiasing of the screen border without having a glow in the shutting down screen) or the different type of windows should use different kinds of GLSL.