MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL-

A beautiful cross platform Desktop Player for Google Play Music
https://www.googleplaymusicdesktopplayer.com
MIT License
8.27k stars 767 forks source link

Set dark window borders with dark theme on Linux #3541

Open cassidyjames opened 5 years ago

cassidyjames commented 5 years ago

Checklist:

OS: Linux (elementary OS 5.0 Juno)

GPMDP Version: 4.6.1

Issue Descriptions:

On GTK-based Linux desktops (like GNOME, XFCE, elementary OS, Ubuntu, etc.), apps can request a dark style. When they do so, they get a dark titlebar—for example, Etcher (another Electron app) successfully does this to better match its UI. Some Atom extensions exist to do the same. Google Play Music Desktop Player could similarly set the dark style for its window borders to better blend in on Linux desktops.

Screenshot from 2019-04-17 01 03 56@2x

Steps to Reproduce:

  1. Use a Linux-based OS with a light theme by default (like elementary OS)
  2. Enable the dark theme in GPMDP
  3. See the mis-matched window borders
welcome[bot] commented 5 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of duplicate issues on this repo, so please double check now that your issue has not already been solved or doesn't have an open issue already. To help make it easier for us to investigate your issue, please follow the contributing guidelines and ensure the issue template was filled out.

MarshallOfSound commented 5 years ago

Happy to accept a PR that does this if anyone knows how

cassidyjames commented 5 years ago

I'm not super familiar with Electron development, but I might be able to point someone in the right direction; it looks like this was only a one-line change in Etcher: https://github.com/balena-io/etcher/pull/2314/files#diff-c8387f489ada58c8ee2920a9659d31f7R50

cassidyjames commented 5 years ago

So to do it by default, it looks like you'd just update the config at

https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/blob/23d97992b8d159b6929d546a308f826c85631d33/src/main/configureBrowser.js#L10-L27

But this will obviously require a little more work for doing it dynamically when the dark option is set. darkTheme is a documented option on browserWindow though, which means it should be straightforward for someone who better knows/understands the codebase.