tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Auto DPI scaling

Open ghost opened this issue 8 years ago • 243 comments

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?

ghost avatar Sep 23 '15 15:09 ghost

I can confirm this on my DELL XPS 15 (monitor 3K + external ultrawide monitor)

XPS Display image

External Monitor (see near it for comparizon: there's a normal explorer window). image

PaoloFalomo avatar Jun 23 '16 14:06 PaoloFalomo

I still have this issue with last version (even reinstall didn't worked). There's no auto DPI scaling.

PaoloFalomo avatar Aug 30 '16 13:08 PaoloFalomo

@auchri this is still not working for me (even with the last update)

PaoloFalomo avatar Sep 16 '16 12:09 PaoloFalomo

@ssorokin I confirm. No response from @telegramdesktop or @auchri or even from @john-preston ... this is a bug and need fix. Maybe there's something more "urgent" right now 😟 .

I had configured the repo for working on the code and may spot the bug but i have to admit that i haven't had much time to work on it 🚶

PaoloFalomo avatar Oct 19 '16 09:10 PaoloFalomo

@PaoloFalomo @telegramdesktop can't respond, because it is an organization account now 😌

This is not something that can be changed any easy way: all the styles are configured when the app is launched according to the current interface scale level chosen in Settings (which is chosen by the current dpi), so at this time there is no way to change the interface scale factor in runtime.

john-preston avatar Oct 19 '16 09:10 john-preston

@john-preston Oh! Ok 😸 for the telegramdesktop user, thx for the info eheh.

Btw i had a similar problem about this developing other win apps.

I think it should all be DPI-AWARE. So it may needs to rewrite a tons of lines of code ? 😮

PaoloFalomo avatar Oct 19 '16 09:10 PaoloFalomo

@PaoloFalomo Yes, Qt sets DPI awareness as per-monitor by default. I guess currently I need to set it to system DPI aware.

john-preston avatar Oct 19 '16 10:10 john-preston

Is there any update on fixing this issue? It has made Telegram desktop rather unusable for me. Which is a shame as it's otherwise fantastic.

AuroraBorealiso avatar Nov 12 '16 12:11 AuroraBorealiso

Also, can we get 175% scaling or adjustable font size? Right now there are only 150% and 200%.

flippinger avatar Nov 12 '16 15:11 flippinger

My primary monitor is 100% scaling and my laptop is 250%. Need to be able to scale based on monitor it's currently on. I like to use my laptop for chat and my monitor for work but I can't right now.

todd-skelton avatar Nov 27 '16 05:11 todd-skelton

Love nearly every aspect of Telegram. But this is actually very annoying. Though running with the web-version in a browser solves it temporary. But then the notifications and stuff is not as good. +1 on this!

hAmpzter avatar Apr 03 '17 08:04 hAmpzter

Qt does support setting DPI awareness to "System Aware" instead of "Per Monitor Aware" by setting DPI bit in platform configuration. I guess another Qt patch for Telegram Desktop would be okay to address issues with multiple displays and DPIs since adapting Per Monitor Aware (even Per Monitor Aware v2 introduced in Windows 10 Version 1703) is hard.

imbushuo avatar Apr 05 '17 13:04 imbushuo

Ok but for example i use 3 monitors each one with very different dpis and i need to move chat on other monitor.

Telegram is the best free chat platform as slack for me... I love the new call feature just tested last week with my father 😍

But...

Even whatsapp currently works on multi-monitor so telegram need this to be fixed. I am a developer and i'd investigate my own to debug this but i've no time at moment :(

PaoloFalomo avatar Apr 05 '17 14:04 PaoloFalomo

@imbushuo that link doesnt mention anything about linux, do you know about the state of things in linux?

matti avatar Apr 05 '17 14:04 matti

Is there any updates on this issue? I have bought laptop with HiDPI screen to save my eyes. And guess what? Telegram at maximum scale is almost unusable for me now :(

nvkv avatar Apr 07 '17 09:04 nvkv

@semka i can confirm. This is still an issue since 2015 😢

PaoloFalomo avatar Apr 07 '17 09:04 PaoloFalomo

@matti I don't know the platform-specific configuration of Qt on Linux. Sorry.

Screenshot (4).png

So at least Telegram modified DPI awareness on Windows to "System Aware" to enable Windows scale it on display with different DPI (in my case, an alternative display at 100%) in the latest update.

imbushuo avatar Apr 07 '17 10:04 imbushuo

+1. Fonts and scrollbar are really tiny with scaling 200 on a 4k display (at 13"). A scaling factor 300 (or 250) would probably solve this. With Microsofts Creator Update 4k displays will get more and more common this year I guess.

tobigun avatar Jun 04 '17 10:06 tobigun

When I disconnect my external display, all the images and icons get blurry. I need to restart the app to solve temporarily the problem.

  • Telegram Desktop v1.1.7
  • macOS Sierra v10.12.5

memiux avatar Jun 19 '17 14:06 memiux

3 days more and it will be one year since my last comment here

PaoloFalomo avatar Jun 20 '17 06:06 PaoloFalomo

@PaoloFalomo and what?

stek29 avatar Jun 20 '17 08:06 stek29

@stek29 It will be my buggyversary.

since i had posted here i have moved to mac os with no problems of dpi scaling between monitors

PaoloFalomo avatar Jun 20 '17 08:06 PaoloFalomo

How can this not be fixed since so many years? This days all top laptops are 3k, 4k. But we still have our old FHD monitors (why switch them, rigth?). So why is it so hard to fix this one?

stgolem avatar Jun 26 '17 17:06 stgolem

@stgolem Because this is just hard in current implementation :( All the layout and graphics are set up for current scale factor on the app launch and can't be changed in realtime right now.

john-preston avatar Jun 26 '17 18:06 john-preston

Is this also an issue on Ubuntu? Can we create alternative Electron app from web client to solve this issue?

stgolem avatar Jun 26 '17 18:06 stgolem

@stgolem This is an issue for Telegram Desktop on all platforms. Yes, you can create an alternative app for that.

john-preston avatar Jun 26 '17 18:06 john-preston

@john-preston How hard would adding 250-350% manual scaling in the settings be? That would make it usable on very high dpi displays when the main display is FHD.

todd-skelton avatar Jun 26 '17 18:06 todd-skelton

I need 400% scaling on MacOS. 250% was not enough for me. I finally have a Retina MacBook Pro but now I can't use my favorite app due to some irrational disablement of a key feature. I'm very sad.

aminozuur avatar Aug 11 '17 10:08 aminozuur

Can we at least get more fixed scale factors available? I'm struggling with it right now, because 150 is too small, and 200 is too large for me on 27 4k. At least give us 175% and >200% for those laptop users.

dlussky avatar Oct 06 '17 11:10 dlussky

Here @imbushuo showed a screenshot with Telegram running as a "System aware" application on Windows 10. I have Telegram version 1.2.6 and Windows 10 1709, but Telegram is reported by Process Explorer as a "Per-Monitor Aware" application. Because of this and the fact that Telegram is not actually per-monitor aware, in a multi-monitor setup using a HiDPI device (Surface Pro 3) and a Full HD 24'' external monitor, the Telegram window content is either too small or too big when the window is moved from one monitor to the other.

Using the executable properties to set its scaling management to "System" allows to show the application with proper size in both screens, but by doing so, the app is blurred on the HiDPI screen. Moreover, when the PC is not attached to the external screen, the application is blurred anyway.

A viable solution would be to make Telegram a "System aware" application again, so that the application would be seen correctly on the "main/only screen" (as selected from Windows settings), and scaled by the OS on the other screens (with the associated blurriness). I think this should be relatively easy to do by changing the qt.conf file as explained on the official Qt documentation, in the Windows section.

madriani avatar Jan 25 '18 13:01 madriani