Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to follow system theme (night/day, dark/light) gone missing on Linux #26782

Closed
victorz opened this issue Sep 12, 2023 · 4 comments
Closed

Comments

@victorz
Copy link

victorz commented Sep 12, 2023

Steps to reproduce

  1. Open up Telegram Desktop on Linux (X11)
  2. Go to chat settings
  3. The option to follow the system theme used to be there, but is now missing

I am installing from the Arch package repositories, so the source code is just downloaded and built and packaged for Arch, according to this PKGBUILD:

https://gitlab.archlinux.org/archlinux/packaging/packages/telegram-desktop/-/blob/main/PKGBUILD

Expected behaviour

The theme should be able to follow the system theme, dark/light mode, but it cannot anymore.

Actual behaviour

There's no setting to enable following system theme anymore, and the client has stopped auto-switching from day to night theme and vice versa when enabling dark/light theme.

Operating system

Arch Linux

Version of Telegram Desktop

4.9.5

Installation source

Other (unofficial) source

Crash ID

No response

Logs

No response

@victorz victorz added the bug label Sep 12, 2023
@Aokromes
Copy link
Collaborator

plz try downloading official static (non-flakpak, non-snap) version from https://desktop.telegram.org

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Sep 13, 2023

This means Qt on your system doesn't support it (QStyleHints::colorScheme should return not Unknown) :(
Try official binary with patched Qt

@victorz
Copy link
Author

victorz commented Sep 14, 2023

Thank you for your replies!

I tried the official (non-flatpak, non-snap) version from https://desktop.telegram.org/, and that works fine. So something clearly changed in the building of the Arch Linux package or a regression was introduced in Qt (is that the implication?).

The official static binary works regardless of the presence of xdg-desktop-portal-kde systemd unit.

Do you know if there's a way that I can check whether this is a problem with Qt on my system or with the way they build the package? How can I be sure which piece of software is in the wrong here?

@ilya-fedin
Copy link
Contributor

That's not a change in the package, it's a change in tdesktop. There was a portal listener but it was removed due to #26370. It's better to not to have this feature consistently than having a bugged behavior with difference between on start and in runtime.

You need to ask your Qt Platform Theme provider (it could be either Qt itself or a third-party Qt plugin like qt6ct) to support QPlatformTheme::colorScheme() method and call QWindowSystemInterface::handleThemeChange() once the color scheme changes.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants