telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.23k stars 5.2k forks source link

Follow system frame theme #27229

Closed vovagorodok closed 10 months ago

vovagorodok commented 10 months ago

Is your feature request related to a problem?

N/A

Describe the solution you'd like

Follow system themes by default like Adwaita in order to have consistency of system UI

Describe alternatives you've considered

N/A

Additional context

No response

ilya-fedin commented 10 months ago

Why do you have 'by default' in the title? There's no such option at all

vovagorodok commented 10 months ago

Maybe not by default, but will be nice to have some option (default for me is better, but for others it may differ). As I see in Advanced options is Use Qt window frame, but it does not follow default (in my case Adwaita) system frame

ilya-fedin commented 10 months ago

Is your issue about window frame exactly? If yes, it sadly couldn't be implemented, Qt is the underlying toolkit tdesktop is written on top of: as long as Qt doesn't support your theme, tdesktop can't support it as well.

If not, there's indeed a room for improvement: the widgets could use Qt styling as well as the window frame does when the option is enabled, although I'm not sure whether that's a goal as that likely means a rewrite of all the widgets as currently they're drawn in a custom material style.

vovagorodok commented 10 months ago

Thanks Ilya for fast answers. Lets narrow this issue to window frame. I'm not sure if it should be resolved on Qt or tdesktop side. Screenshot from 2023-12-18 17-48-29 Qt Creator (written on Qt) and Kate (wtitten on Qt and Kde) follows system frame (Adwaita) theme. image In telegram I have different. Perhaps if Qt application is written in a custom material style it affects to system frame

vovagorodok commented 10 months ago

I'm using flatpak telegram version (Qt Creator and Kate are RPM), perhaps it can be issue. I'll check other flatpak Qt based apps

ilya-fedin commented 10 months ago

This means those applications are built upon older Qt (likely 5.x) that works via Xwayland. X11 always provides server-side decorations while on Wayland they're optional and GNOME uses its freedom to not to provide them so Qt uses its own client-side decorations that don't support gtk themes. You perhaps use some LTS distro given that your Qt is so old, you likely can get tdesktop from the repos that will use the same Qt version and behave the same way but it also will be that old.

vovagorodok commented 10 months ago

I'm on latest Fedora 39 with Qt6 an Wayland. Installed flatpak version of Qt Creator and It has same frame as telegram. Looks that flatpak has issue with forwarding system theme, not telegram issue

ilya-fedin commented 10 months ago

As far as I'm aware Fedora (as all other distros) ship both Qt 6 and Qt 5 so Qt Creator could be built with Qt 5. KDE applications like Kate don't support Qt 6 at all yet (unless it's a beta version)

vovagorodok commented 10 months ago

Qt Creator uses Qt6 as I se: image

Checked additionally Linux 64 bit: Binary telegram, doesn't follow frame theme like flatpak version

vovagorodok commented 10 months ago

Looks that it is Gnome and Flatpak theme consistency issue. Not telegram issue. Not sure if we can somehow resolve this issue in telegram side

ilya-fedin commented 10 months ago

Qt Creator uses Qt6 as I se:

I would rather suggest to check whether it runs via Xwayland, maybe it forces running via X11

vovagorodok commented 10 months ago

xlsclients show only:

gsd-xsettings
ibus-x11
mutter-x11-frames

when QtCreator and telegram is opened

ilya-fedin commented 10 months ago

Hmm, weird. Maybe it's some Fedora extension. Qt doesn't have support for gtk frames upstream.