telegramdesktop / tdesktop

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

Auto DPI scaling #1121

Open ghost opened 9 years ago

ghost commented 9 years ago

Would it be possible to allow the app to automatically change the DPI scaling at runtime depending on which screen it is in?

This is an issue in multi-screen environments with different DPI scaling per screen.

Is this some limitation of Qt?

3cky commented 6 years ago

@igordata nice idea, I've uploaded patched 1.3.14 binary for Linux 64 bit to this Telegram channel. Don't have Windows machine with Visual Studio installed at hand, so no Windows build for now, sorry.

3cky commented 6 years ago

Got a Windows box and built patched 1.3.14 binary, please check it out here.

KonstantinKhabarlak commented 6 years ago

Any chance of getting an official fix? It's been 3 years since the issue was opened, makes Telegram Desktop unusable for me

UPD: Latest beta looks awesome!

mareg commented 5 years ago

Thanks @3cky I've tried it locally and both 250% and 300% scales work fine on my Dell XPS 13 with 4K resolution. I hope this fix will get included in the official release.

mareg commented 5 years ago

As reported in my original issue #4586 my 13" screen has 4K resolution (not sure why, 3200x1800 was perfectly adequate, but in latest xps model dell has increased it to 4K) so 200% scale factor is not enough - text is too small and hard too read in chats. The above fix allowing me to set scaling to 250% or 300% is a massive usability improvement.

stek29 commented 5 years ago

are you using latest version? there should be 250% factor built-in afaik. (without any half-done patches)

NicoHaase commented 5 years ago

are you using latest version? there should be 250% factor built-in afaik. (without any half-done patches)

I'm using the most recent version, and it does not even have proper support for 125%. It just asked for an update, so I'm sure it's the latest beta version

2018-12-06_08-36-22 firefox_2018-12-06_08-36-49

Here's another screenshot on the secondary display without scaling:

telegram_2018-12-06_08-37-56

As you can see there, the font size of this issue, rendered in the latest Firefox, is nearly equal on the secondary display, while everything looks too small on the other screen

john-preston commented 5 years ago

@NicoHaase You can change the scale level in Settings.

NicoHaase commented 5 years ago

@NicoHaase You can change the scale level in Settings.

Yeah, I've just found that setting and experimented: when setting the interface scaling to 125%, everything looks okay on the larger display (with scaling set to 125% in the Windows screen settings), while everything is too large on the secondary display - obviously: the app is now scaled to 125% on that screen too.

mareg commented 5 years ago

I can confirm, that on Linux build version 1.5.1 I can see added scalling options for non HiDPI screens, so 100%, 125%, 150%, 200%, 250%, 300%; and I can see scalling options on laptop with a HiDPI screen: 100%, 110%, 120%, 130%, 140%, 150%. 👍

DropsOfSerenity commented 5 years ago

This was reported in 2015. The correct tag of this would be "bug" not enhancement, as this is incorrect behavior on monitors with separate scaling. It would also make this the most commented bug, at 65 comments.

Just would like to suggest some focus on this one, 4k screens in laptops aren't going away.

john-preston commented 5 years ago

@DropsOfSerenity 4K screen should work fine if this is the only screen. If you drag the app between different screens with different DPIs tdesktop will not rescale :(

izadiegizabal commented 5 years ago

This still happens in Telegram Desktop 1.5.4. I currently have two instances of Telegram Desktop installed with different scaling options to circumvent this issue, it is really annoying. I would hope that after more than three years this issue could be fixed :(.

mackcoding commented 5 years ago

is this issue being ignored?

andreschardon commented 5 years ago

This is actually the only desktop app I use that doesn't automatically change the scaling when I move it to another monitor on Windows 10. We need this!

stefankip commented 5 years ago

Agree, ran into this issue just now. Moving the telegram app to a high DPI screen results in a really small UI.

statyan commented 5 years ago

Guys, could you add "at least" an option to tray icon context menu "Restart". For now after moving telegram from one display to another I have to restart it manually - go to context menu, click Quit, open Start menu, find Telegram, click it to run. Very annoying. Adding at least "restart" option will be a quick workaround for the issue until you will be able to find a fix.

igordata commented 5 years ago

Guys, could you add "at least" an option to tray icon context menu "Restart".

After updates there is a button at the left down corner of the window. It does the restart.

Anyway, we here in this issue are complaining about the DPI problem. :D You should create your own issue.

Aokromes commented 5 years ago

@3cky since a lot of people asks, you may add to that commit of your 175% and 75% scaling and make a pull request for it? :)

orange391224 commented 5 years ago

So what about auto scaling?

Aokromes commented 5 years ago

@orange391224 https://github.com/telegramdesktop/tdesktop/issues/5365#issuecomment-438183577

ghost commented 5 years ago

Also an issue for me. A quick way to restart it upon monitor change would be really appreciated.

Twilightssuperb commented 5 years ago

We need to create breaking solution for it by users community. Maybe, you should announce a bit crowdsourcing for this issue to some Telegram channels. It could be big idea, someone (with strong design and webdev skills) would help us. 🙏

shbharath commented 5 years ago

+1

yippp commented 5 years ago

+1

Twilightssuperb commented 5 years ago

Not Auto DPI yet, but closer... https://github.com/telegramdesktop/tdesktop/commit/47910b2ae180b6429adafef13ebf97cb75ad9dca Hooray! 🙌

loalexzzzz commented 5 years ago

is it fixed? problem still exist..

jlanng commented 5 years ago

Still a big annoyance for me

alienzj commented 5 years ago

+1

NoHarmDan commented 5 years ago

Issue still exists. Kinda silly after all this time, isn't it?

ddonetskov commented 5 years ago

Yeah, it looks like that. I have been suffering from this issue over a year, my setup is a laptop with a HighDPI screen and an external monitor with the standard DPI. Whenever I move the Telegram client's window from the HighDPI screen to the other one, it becomes ridiculously large.

I guess most of Telegram's developers use laptops from Apple and are not motivated enough to fix the issue for users on Windows. That's a bit shocking given WhatsApp and Slack seem to be free from the issue, as well as most of other up-to-date programs. This behavior of the Telegram client on Windows contradicts to the reputation of Telegram as an innovative company living on the cutting edge.

JonMcDevitt commented 5 years ago

Four years later and this is still a problem? I just upgraded my monitor today and opened up telegram and WHAM everything is shrunken and virtually unreadable. Huge annoyance and something that would prevent me from using it further, as I already have eye strain issues.

john-preston commented 5 years ago

@JonMcDevitt You can choose interface scale in Settings.

NoHarmDan commented 5 years ago

@john-preston it's not dynamic, it doesn't change when you drag it from one screen to another (with different scaling). It's not a solution for this problem.

capo42 commented 4 years ago

I wanted to say Byebye to Whatsapp and welcome to Telegram.. But the scaling is horrible. Please take care of autoscaling and we all happy

bernikr commented 4 years ago

I have found a workaround by setting the High DPI scaling override in windows to System for the telegram.exe. This makes the desktop app usable again.

https://blogs.windows.com/windowsdeveloper/2017/05/19/improving-high-dpi-experience-gdi-based-desktop-apps/

capo42 commented 4 years ago

@bernikr You are my hero! Only issue i found is that the rightclick does not work propper (e.g. Achiving chats) But i can live with it

EmanuelAlexandru commented 4 years ago

I have found a workaround by setting the High DPI scaling override in windows to System for the telegram.exe. This makes the desktop app usable again.

https://blogs.windows.com/windowsdeveloper/2017/05/19/improving-high-dpi-experience-gdi-based-desktop-apps/

It cannot be applied to the UWP app. Also, it makes the app look blurry on the desktop version.

Pecacheu commented 4 years ago

Wow this is a very long issue thread with many duplicates! (Ahem there's probably a reason for that)

I actually had 175% working when I first installed Telegram and things looked great on my high-DPI 3K laptop screen... But for whatever reason, the option disappeared again in the latest version, leaving me stuck on 150% which is absolutely tiny and barely readable on a super high resolution 12" laptop display!

Additionally the fact that Telegram can't auto-scale in a multi-monitor setup is highly annoying, especially when Discord does this flawlessly. I understand the issue that all the assets are pre-rendered when the app is launched and can't be re-rendered during runtime, however:

  1. How about just... don't do that, yeah?
  2. We aren't exactly living in Amiga days anymore, I think my hexa-core gaming laptop processor can handle rendering a few SVG's at 32x32 pixels, heck it could probably re-render the whole app 60 times a second with no cache at all (if you're crazy like that). I mean the web is a perfect example. Despite the best efforts of efficient web engines, website elements and content often must be constantly re-rendered in real time an EXTREMELY inefficient manner, and yet even most interactive page elements (without using Canvas or hardware acceleration like an HTML5 game would) often run with virtually no lag on a modern smartphone. Kind of a testament to how powerful our modern devices are compared to where we began, I think we can handle a little code inefficiency for the sake of real-time UI scaling.
  3. Okay back to the first point but serious this time, regardless of how complex a change it might be, if you had started gradually working on fixing this when this thread was CREATED it probably would have been done by now. Even if there is some kind of limitation in Qt, just use a Winapi hook to detect the DPI of whatever screen the app is moved to.
Aokromes commented 4 years ago

maybe this can give a light. https://doc.qt.io/qt-5/highdpi.html https://doc.qt.io/qt-5/scalability.html

MrSpock commented 4 years ago

Revese operation is also a problem. When moving telegram app from HDPI screen with with default scale (i.e laptop build in display) to external FHD monitor app is HUGE. So .. 5 years passed since this bug opening and this is still an issue ? This is good contender for longest bug open.

XPOL555 commented 4 years ago

@MrSpock As first commenter i can say the struggle is real but had solved my issue buying a mac.

eiarhabi commented 4 years ago

I'm currently using a 2k screen with 175% DPI on Windows and 125% looks tool small while 200% seems to be too large. Is Telegram still having plan to add support for 175% scale?

Aokromes commented 4 years ago

I'm currently using a 2k screen with 175% DPI on Windows and 125% looks tool small while 200% seems to be too large. Is Telegram still having plan to add support for 175% scale?

you can use command line to set 175%

roberth1990 commented 4 years ago

I'm currently using a 2k screen with 175% DPI on Windows and 125% looks tool small while 200% seems to be too large. Is Telegram still having plan to add support for 175% scale?

you can use command line to set 175%

How do I do that on windows?

eemitev commented 4 years ago

This may be relevant/helpful https://bugreports.qt.io/browse/QTBUG-48242

ilya-fedin commented 4 years ago

This may be relevant/helpful

tdesktop uses custom scaling engine, as @john-preston stated, i.e. implementing this request means rewriting a big part of the app :(

Probably that's why this request isn't implemented in 5 years and I have a feel that it won't be implemented in another 5 years (maybe only in a new client xD)

Dimensional commented 4 years ago

Why is the client using a custom scaling engine? I assume the desktop app was written before the scaling feature was built into the qt backend?

john-preston commented 4 years ago

@Dimensional Yes. Also it allowed to have different scalings on the same screen dpi that you can just choose in Settings. Different people use different scale factor on the same screens.

splastunov commented 4 years ago

Hello!

Same problem here. I have dell XPS 15" 4k + external fullHD display. OS Windows 10. Default scale 250%

There is a problem with scaling when you move app from one display to another. The same problem with dock icon.

It will be nice to fix this 4 years old bug.

Thank you.