Hello TDE Developers,
I recently purchased a Dell XPS15 laptop for my daughter and before I turn it over to her, I am experimenting to see what must be done to make it usable under Linux/TDE for those with no better than normal eyesight. Per EDID, the laptop's native screen resolution is 3840 x 2160 and its physical screen dimensions are 346 x 194mm (~15.6" diagonal). My objective is to run the laptop at native resolution both inside and outside of X (no re-scaling).
Using the EDID metrics, it is pretty easy to determine during boot an optimum terminal font (ter-i32b.psf) and X font scaling (Xft.dpi=240). After that, using the TDE control panel to increase panel and icon sizes produces a nice looking desktop environment … almost.
The remaining issue concerns TDE window/menu controls that are too small. These include window resizing double-arrows, window scrollbar and associated up and down arrows, the menu-submenu right arrow, list expand-collapse (+/-) controls, checkboxes, and radio buttons.
I suspect that these resources are part of QT3 but don't really know for sure. I suspect QT3 because applications that do not use that toolkit (e.g. LibreOffice and Firefox) do not manifest the problem.
I am hoping that somebody more knowledgeable about GUI configuration and programming can point me in the right direction. Is this something that can be corrected via a configuration file (e.g. qtrc)? If not, can somebody point me to where in in the source code tree I should be looking and what I would need to do to correct this?
Of course, if HiDPI issues have already been addressed by others in the post R14.0.4 source code, that would be great.
Thanks in advance for your insights and help.
Vince Reher
[I am not a developer.]
Vincent Reher composed on 2017-12-09 19:21 (UTC-0800):
I recently purchased a Dell XPS15 laptop for my daughter and before I turn it over to her, I am experimenting to see what must be done to make it usable under Linux/TDE for those with no better than normal eyesight. Per EDID, the laptop's native screen resolution is 3840 x 2160 and its physical screen dimensions are 346 x 194mm (~15.6" diagonal). My objective is to run the laptop at native resolution both inside and outside of X (no re-scaling).
Using the EDID metrics, it is pretty easy to determine during boot an optimum terminal font (ter-i32b.psf) and X font scaling (Xft.dpi=240). After that, using the TDE control panel to increase panel and icon sizes produces a nice looking desktop environment … almost.
15.6" nominal is physically 282.42 DPI @3840x2160 resolution: http://fm.no-ip.com/PC/displays.html
3840x2160 is considered "quad density", aka 4K resolution.
For a little perspective, consider what increased density means drawing icons or text characters compared to lower resolutions.
15.6" nominal is 141.21 DPI @1920x1080 resolution (the HDTV standard). The reference DPI, on which web standards are based, and from which most software developers worked until production display densities started to considerably exceed the standard reference, is 96. A screen that actually is 96 DPI @1920x1080 would be almost 23".
At the reference, a 16px by 16px icon is comprised at most of 16^2 or 256 pixels, and measures 4.417mm square. Going down to a 15.6" screen at that same resolution shrinks those same pixels into a 141 DPI 3.003mm square space. Raising the resolution to *nominal* quad (3840x2160) squeezes those 256px into 242 DPI 1.502mm square space.
The converse is that in order to get an icon that was 4.417mm square on a true 96 DPI screen to stay that size on a 15.6" screen @1920x1080 would require utilizing approximately 554 pixels. On a quad screen, 3840x2160, that jumps to 2216.
Computers can be programmed to scale up objects so as to improve their physical size, but with images that comprise the standard 96 DPI icons, their appearance cannot be improved to take advantage of higher available pixel density. Higher density screens need to have different, and much larger, icons.
The remaining issue concerns TDE window/menu controls that are too small. These include window resizing double-arrows, window scrollbar and associated up and down arrows, the menu-submenu right arrow, list expand-collapse (+/-) controls, checkboxes, and radio buttons.
I suspect that these resources are part of QT3 but don't really know for sure. I suspect QT3 because applications that do not use that toolkit (e.g. LibreOffice and Firefox) do not manifest the problem.
TDE and its own applications are QT3-based. QT3's initial release was 16 years ago and for all practical purposes its development ended 3.5 years later, mid-2005.
QT3's design foundation is close to two decades old, well before developers had to consider escalation of display densities. Some elements could be scaled with density, by using units that scaled (e.g. pt, mm or in), but images weren't among them. Some design elements used a mixture of pixel units and scalable units, while others used one or the other. Compromises were inevitable where densities varied more than a little from the standard.
Image scaling simply can't work as well as today's "HiDPI" screens require. Either images in additional sizes need to be provided, or a different kind of image designed to be scaled need to be provided, or both. QT3 wasn't designed for scalable images, and no one ever provided much in the way of additional images, or just as, or more, importantly, an effective framework for utilizing them without compromises.
Getting TDE off QT3 onto a foundation that fully supports "HiDPI", assuming any such open source foundation actually exists at this point, in my estimation would require resources several orders of magnitude larger than those available to the TDE project.
I am hoping that somebody more knowledgeable about GUI configuration and programming can point me in the right direction. Is this something that can be corrected via a configuration file (e.g. qtrc)? If not, can somebody point me to where in in the source code tree I should be looking and what I would need to do to correct this?
IMO you're probably facing a choice between using TDE and not using native resolution. At a normal viewing distance, 141 DPI ought to be as high a display density as anyone with no better than average visual acuity can fully appreciate, absent side-by-side comparisons, where differences may or may not be detectable without getting closer or using a magnifying glass.
I suggest giving 1920x1080 (physically 141 DPI) a try. The kernel cmdline can be configured through the bootloader menu to have it override EDID and use 1920x1080. Xorg and thus TDE should use that mode automatically, but if it does not, Xorg can readily be configured to use it directly. TDE settings can do same if need be.
Fonts in apps generally work best if DPI is a multiple of 24 (96 * 1.25, 96*1.50, 96*1.75, etc.), less well at 12X, even less well at 4X or 8X, so at 1920x1080 you might wish to try forcing DPI to 143 or 144. 144 is a breakpoint in some software design, so you might notice some big differences between 143 and 144. Depending on how good your daughter's vision is, leaving logical DPI set to its 96 default may well prove acceptable with 1920x1080.
Of course, if HiDPI issues have already been addressed by others in the post R14.0.4 source code, that would be great.
Leaving QT3 has been suggested, but I've seen nothing on this mailing list or on IRC to suggest anyone thinks it could ever happen.
HTH
On Sat, Dec 9, 2017 at 19:21 (-0800), Vincent Reher wrote:
Hello TDE Developers,
I am not a TDE developer, but if you are willing to hear from random people on this olist...
I recently purchased a Dell XPS15 laptop for my daughter and before I turn it over to her, I am experimenting to see what must be done to make it usable under Linux/TDE for those with no better than normal eyesight. Per EDID, the laptop's native screen resolution is 3840 x 2160 and its physical screen dimensions are 346 x 194mm (~15.6" diagonal). My objective is to run the laptop at native resolution both inside and outside of X (no re-scaling).
I am using a macbook pro (2880x1800 on a 15" screen) and a 4K 27" monitor, and I went through this a while back.
Having said that, while I use various TDE programs, I don't use TDE's window manager, so this advice may not work for you.
<snip>
Of course, if HiDPI issues have already been addressed by others in the post R14.0.4 source code, that would be great.
I solved a lot of problems by putting
export GDK_SCALE=2
in my ~/.xprofile, which gets read by /etc/X11/xdm/Xsession, /etc/tde/tdm/Xsession and /etc/kde/kdm/Xsession (at least on my system) and helps a lot of GTK3 programs look reasonable.
It shouldn't hurt (too much) to give this a try. I'd be interested in knowing how it works out.
It is too bad that so many software designers assume that screen resolutions would be 90 - 100 DPI for all time.
Cheers.
Jim
On Sat, 9 Dec 2017 19:21:19 -0800 Vincent Reher tde@4reher.org wrote:
The remaining issue concerns TDE window/menu controls that are too small. These include window resizing double-arrows, window scrollbar and associated up and down arrows, the menu-submenu right arrow, list expand-collapse (+/-) controls, checkboxes, and radio buttons.
I suspect that these resources are part of QT3 but don't really know for sure. I suspect QT3 because applications that do not use that toolkit (e.g. LibreOffice and Firefox) do not manifest the problem.
I am hoping that somebody more knowledgeable about GUI configuration and programming can point me in the right direction. Is this something that can be corrected via a configuration file (e.g. qtrc)? If not, can somebody point me to where in in the source code tree I should be looking and what I would need to do to correct this?
Widget appearances are dictated by the style code, which is applied by QT3. You would have to either fix QT3 or create a new widget style to make everything correctly HiDPI-sensitive. However, you *may* be able to improve your experience somewhat by selecting the "High Contrast" style and turning on "Use wider lines" in its configuration. This will make most widgets somewhat larger. It isn't the most elegant style, though.
If you are interested in authoring your own widget style (requires C++ knowledge, unfortunately), you can find existing styles in tdelibs/tdestyles and tdeartwork/styles.
If you want to patch QT3 directly, my guess is that you would have to look at qt3/src/styles/qcommonstyle.cpp , which has a lot of size-related magic constants you could play with.
E. Liddell