| Summary: | plasma5 show tiny icons in HiDPI screens | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Giuseppe Ghibò <ghibo> |
| Component: | general | Assignee: | David Edmundson <kde> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | bshah, plasma-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | 5.8.3 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
don't force disabling automatic scaling
patch equivalent to original behaviour of QT_AUTO_SCREEN_SCALE_FACTOR=0 |
||
|
Description
Giuseppe Ghibò
2016-11-03 22:07:52 UTC
Thanks, but there's a reason it's like this. With it enabled *and* manual scaling set, which you've also left enabled, some apps (nextcloud for example) will double scale. Also we have a huge problem that many many monitors report wrong DPI, if you leave auto on by default you get a tonne of bug reports. For that reason we have a manual setting in kscreen; that also adjusts your xrdb DPI which means GTK2 and Qt4 apps /sort of/ scale the font. The problem is that in this way you make it impossible to fix outside Plasma trough extra init scripts, unless one would change manually the binary of startkde, which usually nobody do because that would require altering the binary of a package in /usr/bin. It's not that manual scaling I left enabled, but rather I prefer to let decide that outside Plasma, in other (x)init scripts. Actually getting HiDPI working everywhere is almost impossible, as you fix something to get good looking and get other things wrong. Here the real problem is not the text size scaling, but the size of widgets (icons, scroll bars, etc.). Indirectly it affects also text scaling, but in spacing rather than sizing (you might see for instance fonts of right size, but wrong spaced vertically). Furthermore adjusting xrdb trough fixing for instance Xft.dpi: value will led to unpredictable results to other applications (e.g. libreoffice, firefox), so from my experience the best results is achieved leaving global xrdb Xft.dpi settings untouched, and settings QT_AUTO_SCREEN_SCALE_FACTOR=1. If you want to get the best of both the configuration I suggested, and yours, a good idea would be to keep the forcing the setting of the QT_AUTO_SCREEN_SCALE_FACTOR=0 outside startkde script (because that's mainly common to QT apps), in this way: -export QT_AUTO_SCREEN_SCALE_FACTOR=0 +source /etc/sysconfig/plasmaqtsettings +if [ -n "$QT_AUTO_SCREEN_SCALE_FACTOR" ]; then + export QT_AUTO_SCREEN_SCALE_FACTOR +fi and in /etc/sysconfig/plasmaqtsettings you place QT_AUTO_SCREEN_SCALE_FACTOR=0 as default. The result for you is equivalent and it's not changing, QT_AUTO_SCREEN_SCALE_FACTOR=0 before, QT_SCREEN_SCALE_FACTOR=0 now, but that /etc/sysconfig/plasmaqtsettings can be marked as a "config" file, so it can be altered either manually or by some extra config util, and won't change with package upgrades. At most a user can even decide to place in /etc/sysconfig/plasmaqtsettings QT_AUTO_SCREEN_SCALE_FACTOR=1 there, and enable the autoscaling, as he prefer. You already did a similar mechanism in the same script for QT_SCREEN_SCALE_FACTORS. Consider also that nowadays it's important the dynamic scaling with dpi. It's not that once you fixed the DPI that will stay to that dpi there forewer. One might have for instance have a "live installation", which one might boot with an HiDPI or not. So it's important to having something that scales automatically for *most* of the applications, without continuosly adjusting the icons size, fonts size, scale factor (of course there could be always some exception). Another use where dynamic setting is important is for instance when you might adjust the screen resolution (and thus dpi as consequence) in hardware and dynamically (e.g. you might have a 3820x2140 monitor but decide to have it working at 1920x1080 or 2560x1440). Created attachment 102041 [details]
patch equivalent to original behaviour of QT_AUTO_SCREEN_SCALE_FACTOR=0
This patch maintains the same original behaviour of QT_AUTO_SCREEN_SCALE_FACTOR=0 but moves the configuration in an external config file.
Plasma already has a system for allowing you to set env vars between that part of startkde and kdeinit launching. Any autostart scripts set as pre-startup are sourced and env vars can be modified. Perfect. |