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

Monochrome icon settings are not displayed in Windows 10 build 17763 #27056

Closed
aeiouaeiouaeiouaeiouaeiouaeiou opened this issue Nov 6, 2023 · 10 comments
Labels

Comments

@aeiouaeiouaeiouaeiouaeiouaeiou

Steps to reproduce

Despite matching the version check code and Qt 6.5 support the icon settings do not appear.

Expected behaviour

A toggle switch should be shown.

Actual behaviour

see top

Operating system

Windows 10 LTSC 1809 (17763.4974)

Version of Telegram Desktop

4.11.5

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 6, 2023

tdesktop uses Qt 5.15 on Windows. Although that part of the code is not related to the option or monochrome icon at all, it's related to application night mode detection as builds with Qt 6.5+ use Qt API.

@ilya-fedin
Copy link
Contributor

As you can see, having build 17763 is not enough, the registry key query must also success. It may be that the version check is incorrect and your Windows version doesn't support the registry key. There's nothing you can do except of updating Windows then.

@ilya-fedin
Copy link
Contributor

According to this wiki page, you need build 18282 or newer
https://en.m.wikipedia.org/wiki/Windows_10,_version_1903

@aeiouaeiouaeiouaeiouaeiouaeiou
Copy link
Author

@ilya-fedin I don't think so because I solved this problem after adding that registry key. Probably the code should have blocked only auto-enablement, but not access to setting.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 7, 2023

Windows 10 1809 doesn't have the feature so reading the key on it is wrong. Setting this key to 1 will lead to black icon on black taskbar rather than the system switching to the light theme.

@blankCubicle
Copy link

@ilya-fedin Why disable the monochrome icon entirely for earlier Windows versions? Dark taskbar is supported in these, it is the only option, it could just display the white icon without issue if the user enables the setting, LTSC 1809 (17763) users can still benefit. The registry check only needs to be done on v18282 and up to display the black icon if the taskbar is light/white. It could fall back to white icon if the key doesn't exist.

@ilya-fedin
Copy link
Contributor

Dark taskbar is supported in these

The feature in question is light taskbar, not dark taskbar. Before light taskbar there were no way to check taskbar background (I'm not aware about any way at least) and without a way to check taskbar background it's unreliable.

@ilya-fedin
Copy link
Contributor

it could just display the white icon without issue if the user enables the setting, LTSC 1809 (17763) users can still benefit.

1809 has only AppsUseLightTheme which is irrelevant for the use-case. Application dark mode has nothing to do to the system appearance, you will still have dark taskbar in light mode and get dark icon on dark taskbar.

@blankCubicle
Copy link

1809 has only AppsUseLightTheme which is irrelevant for the use-case. Application dark mode has nothing to do to the system appearance, you will still have dark taskbar in light mode and get dark icon on dark taskbar.

Sorry, when I said "if the user enables the setting" I was referring to Telegram's monochrome icon setting, not the Windows' app theme mode.

The problem is that you can't get the white icon for your dark taskbar. Since the monochrome icon setting is missing, you're forced to use the blue icon when the white icon would do just fine.

I'm saying the registry check is unnecessary for 17763, the taskbar will always be dark, so allow us to use the white tray icon.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 10, 2023

Sorry but it's not possible to implement monochrome icon without knowing what background will be under it or you take a risk of having icon color the same as the background which is a no-go for an official client. If you know API for older Windows versions then feel free to help but otherwise you have to accept you have to upgrade your OS for new features.

Interested people can perhaps also create an unofficial fork with manual dark/light/color choice.

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

No branches or pull requests

4 participants