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?

PaoloFalomo commented 8 years ago

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 commented 8 years ago

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

PaoloFalomo commented 8 years ago

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

PaoloFalomo commented 8 years ago

@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 🚶

john-preston commented 8 years ago

@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.

PaoloFalomo commented 8 years ago

@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 ? 😮

john-preston commented 8 years ago

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

AuroraBorealiso commented 8 years ago

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.

flippinger commented 8 years ago

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

todd-skelton commented 7 years ago

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.

hAmpzter commented 7 years ago

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!

imbushuo commented 7 years ago

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.

PaoloFalomo commented 7 years ago

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 :(

matti commented 7 years ago

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

nvkv commented 7 years ago

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 :(

PaoloFalomo commented 7 years ago

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

imbushuo commented 7 years ago

@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.

tobigun commented 7 years ago

+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.

memiux commented 7 years ago

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

PaoloFalomo commented 7 years ago

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

stek29 commented 7 years ago

@PaoloFalomo and what?

PaoloFalomo commented 7 years ago

@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

stgolem commented 7 years ago

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?

john-preston commented 7 years ago

@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.

stgolem commented 7 years ago

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

john-preston commented 7 years ago

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

todd-skelton commented 7 years ago

@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.

aminozuur commented 7 years ago

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.

dlussky commented 7 years ago

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.

madriani commented 6 years ago

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.

yduman commented 6 years ago

I am using the Telegram Desktop Client on Linux and I can scale it via Settings --> Interface Scale

mareg commented 6 years ago

Telegram-desktop is too small on 13" 4K screen. It correctly detects it's a hidpi screen and sets scaling factor to 200%, but I'd prefer 250% or 300%. I've managed to make it larger by setting up the QT_SCALE_FACTOR environmental variable to 3, but then when I select any chat, app will freeze and become unusable. I'm using latest telegram-desktop on Fedora 27 linux.

Shadorino commented 6 years ago

It's been over 2,5 years since this problem was first brought up. Is there any sign of the devs working on a scaling option over 200 % ?

TemaGambik commented 6 years ago

Save my eyes!

Twilightssuperb commented 6 years ago

This is how it works at Everdo for Windows PC (seems it based on Qt): everdo zoom ui

wzul commented 6 years ago

Please fix this! I'm using Dell XPS 13 (9370) with 4k display. The display seems to small without 300% scale option

statyan commented 6 years ago

I love the Telegram so much but I struggle for every day I connect my laptop to different displays with different DPI. Could we at least apply a patch which will restart Telegram when it was moved to another display ? Is it possible ? For now I restart it manually each time I disconnect laptop from dock station. Very annoying... Thank you guys!

hpfmn commented 6 years ago

Would be nice if telegram could recognize multi dpi evironments. Every other QT5 App does that out of the box with QT_AUTO_SCREEN_SCALE_FACTOR=1 environment variabel - so telegram is somehow activly disabling that.

EDIT: the code is here https://github.com/telegramdesktop/tdesktop/blob/c7a4d67cfb63af74f6da6ca35aea9ad08cf65588/Telegram/SourceFiles/core/launcher.cpp#L41

ugzv commented 6 years ago

The font on Dell 4k 13xps is just too small. Please make an option to scale up to 300% or more.

hilyin commented 6 years ago

I have this issue on win10 switching between 4k and convential dpi monitor. I have to manually adjust the "interface scale" every time since auto has no effect.

frankmethling commented 6 years ago

Please update the Software to allow higher scale 300% or more. I have a new HP Spectre 360 with 15" 4 K Display and can barley read telegram messages with my best glasses on. Very difficult to use.

grigoryvp commented 6 years ago

Same here. Interface is too small even on cheap Lenovo 720S with 4k screen. There are lots of Windows laptops with 4k screens now.

shal commented 6 years ago

Same with my Macbook Pro, save my eyes!

ddonetskov commented 6 years ago

I'd like to confirm it's still the issue for me. My configuration is

the Windows client 1.3.14 on Windows 10, a WQHD 14'' internal screen with the 175% system scaling factor and the 150% scaling factor set in Telegram, an FHD 24'' external screen with the 100% scaling factor. The client is rendered usable on the internal screen (though I'd appreciate a bit larger fonts with the same size interface elements so the font size setting would be handy here too) but when I move its window to the external screen, it's shown too large.

That's the annoying issue especially given most of the other applications which are being actively developed do not suffer from it. Hopefully, we'll get a fix for it.

P.S. Otherwise, the Telegram client is great. )

3cky commented 6 years ago

JFYI, I've managed to add 250% and 300% scales support to Telegram client, anyone interested could check it in my hdpi branch. Emoji and icon set images are just upscaled 200% ones, but it's still a way better than tiny letters at 200% on my Dell XPS 13.

lucidyan commented 6 years ago

@3cky I looked at your code and it seems good. It will be very nice if you make a pool-request! Those who want to build from the source code will clearly not be so much, but if the contributing will be accepted, then all of us would thank you.

And apparently, the developers don't care about this issue a lot. (3 years passed by)

3cky commented 6 years ago

@lucidyan I'm not quite sure that developers are interested in code since it's rather trivial. Here @john-preston wrote that 250%+ scaling support adding problem is in graphics. Upscaled 200% graphics looks very decent to me, but it seem the Telegram team don't like it, so here we are.

igordata commented 6 years ago

@3cky maybe it's because 250% may make images blurry. Maybe it would be better to scale 100%, 200%, 300% and 400% only to force pixel on images be drawn as squares with side 1, 2, 3 and 4 pixels.

igordata commented 6 years ago

@3cky could you please also build it for me? or even create a telegram group when you will send new releases with hdpi support =) that would be awesome

vinjenzo commented 6 years ago

I`d like to share what worked for me! (EDIT: actually I get some blur on high dpi screen, while the interface autoscale correctly)

I followed the advise from this article and then restarted telegram (edit: its settings "interface scale" is disabled)

how-improve-app-dpi-scaling-enabling-system-enhanced-feature-windows-10