anandnet / Harmony-Music

A cross platform App for streaming Music
GNU General Public License v3.0
975 stars 74 forks source link

fix: allow use of qt window decorations #235

Closed Merrit closed 5 months ago

Merrit commented 5 months ago

Currently, Flutter defaults to always using GTK window decorations regardless of the window manager, when running Wayland. This makes the app look out of place on KDE Plasma and other Qt-based desktop environments.

This change checks the XDG_CURRENT_DESKTOP environment variable to determine the running desktop environment, and if it is GNOME continues to use the GTK header, otherwise it uses the Qt header.

Before After
image image

Now in the after screenshot, the window has native decorations on KDE with user-customized controls for things like pin to all workspaces.

anandnet commented 5 months ago

@Merrit thanks for the contribution.