mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.22k stars 1.1k forks source link

Support auto light/dark theme selection #4420

Open jzelinskie opened 4 years ago

jzelinskie commented 4 years ago

Context macOS users with the "Auto" Appearance configuration set (which is the default) have all of their applications transition between Light and Dark modes at sunset/sunrise.

Describe the feature you have in mind Mumble already supports a Light and Dark theme that fit with the OS themes well, it need only switch between them at the right time.

Describe alternatives you've considered This might be something for qt to handle, rather than Mumble itself.

Additional context

Krzmbrzl commented 4 years ago

From what I find on the web it seems like this kind of feature is supported from Qt 5.12 onwards. I think however that our explicit theming breaks the automatic transitions and I suppose that is why it's not showing.

Switching themes while Mumble is running is not possible either as that requires it to be restarted so I'm not sure if that'd make for a great experience...

What version of Mumble were you testing? And what Qt version was it built with (Can be found out in the Help dropdown menu)?

jzelinskie commented 4 years ago

I think however that our explicit theming breaks the automatic transitions and I suppose that is why it's not showing. Switching themes while Mumble is running is not possible either as that requires it to be restarted so I'm not sure if that'd make for a great experience...

Agreed. However, I'd reckon that majority of macOS users would probably prefer to forgo explicit theming in order to support this functionality. Having a checkbox enabling theming or setting the theme in the dropdown to "None" could be used as the flag to fallback to this qt functionality.

What version of Mumble were you testing? And what Qt version was it built with (Can be found out in the Help dropdown menu)?

I wasn't using anything crazy -- just latest stable release, 1.3.2, which ships Qt 5.6.2. I don't mind building something to test behavior if the development team does not have any macs for testing.

Krzmbrzl commented 4 years ago

I wasn't using anything crazy -- just latest stable release, 1.3.2, which ships Qt 5.6.2. I don't mind building something to test behavior if the development team does not have any macs for testing.

That'd be great as my findings were that this feature got introduced with Qt 5.12. So maybe it could be working (a bit?) after all ^^ I think it shouldn't matter whether you build the current master branch or the 1.3.x branch as nothing changed in regards to theming.

The build instructions are located at https://wiki.mumble.info/wiki/BuildingMacOSX but looking at them I think they are outdated. Instead you might want to use the build scripts we use on our macOS CI (these only work with the master branch though as they're using cmake. If you want to build 1.3.x, then I can point you to the old build scripts in that branch):


However, I'd reckon that majority of macOS users would probably prefer to forgo explicit theming in order to support this functionality. Having a checkbox enabling theming or setting the theme in the dropdown to "None" could be used as the flag to fallback to this qt functionality.

I think though that this would be a non-trivial change in the code. Plus it's make the maintenance of the code harder as everything had to be tested with and without theming :thinking: This all is made even worse by the fact that no active core developer owns a Mac and thus we can only use the macOS CI to test our changes. And besides being really cumbersome it doesn't work at all for UI stuff.

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action.

Please reach out if you have or find the answers we need so that we can investigate further (or if you feel like this issue shouldn't be closed for another reason).

davidebeatrici commented 3 years ago

Maybe we could add a flag to each theme that indicates whether it's dark/light/neutral and then decide which one to set depending on the system's.

rakleed commented 3 years ago

It would be great if you could add support for this functionality to your Windows app.

TerryGeng commented 2 years ago

Maybe we could add a flag to each theme that indicates whether it's dark/light/neutral and then decide which one to set depending on the system's.

For macOS: https://successfulsoftware.net/2021/03/31/how-to-add-a-dark-theme-to-your-qt-application/

Seems to be an easy one. Will do if I have time.