4K resolution (GUI scaling)

Bug #1372781 reported by Alexander Wolf
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Wishlist
Unassigned
0.14
Fix Released
Wishlist
Unassigned

Bug Description

Hi,

I recently bought a laptop with a 3200x1800 resolution screen. Stellarium still works, but the icons and text get really small.. 4 times smaller than normal. Can you get a update out to fix this? Just so i can scale the icon and text size. Thanks a lot in advance!

Casper

Tags: gui hidpi
Revision history for this message
casper van donk (caspervandonk) wrote :

Here you have the screenshot!

Revision history for this message
casper van donk (caspervandonk) wrote :

I think this one is better, here you see that the icons are really small.

Casper

Changed in stellarium:
importance: Undecided → Wishlist
tags: added: gui
Revision history for this message
gzotti (georg-zotti) wrote :

Technical info that may help develop a solution.

http://www.drdobbs.com/windows/coding-for-high-dpi-displays-in-windows/240168736

I have no Win8.1 with such a screen to test.

tags: added: hidpi
Revision history for this message
Alexander Wolf (alexwolf) wrote :
Revision history for this message
Alexander Wolf (alexwolf) wrote :

You can try set environment variable QT_DEVICE_PIXEL_RATIO=2 as workaround.

Revision history for this message
treaves (treaves) wrote :

They would be 50% smaller, (2x), not 75% smaller.

This isn't really a HiPDI issue any longer. Screens any more are an (almost) arbitrary size. Simply scaling the icons to 2X isn't going to be a long-term solution. The UI elements probably should be scaled to a percentage of screen width.

Revision history for this message
Szabolcs (szhorvat) wrote :

"You can try set environment variable QT_DEVICE_PIXEL_RATIO=2 as workaround."

I tried this and it doesn't seem to make a difference. I double checked that the environment variable is set by typing "set" in a command window. Are you sure it should work?

I use Stellarium 0.13.2 on Windows 8.1.

Revision history for this message
Glenn Sanbel (glennsnabel) wrote :

This does not work.
Surely the developers will look into this as 4k displays will become more and more common place ?

Changed in stellarium:
status: New → Confirmed
Revision history for this message
Quaoar (jwglasspe) wrote :

Alexander:

I also have 3200x1800 display. Edited Screen_w and Screen_h in the default_config file for 13.3 to reflect the screen dimensions and no joy.

Also, I do not quite understand your comment above. Did you add environment variable hidpi? If so, I cannot find it in the 13.3 config file. Is this a new 13.4 version?

Thx.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

*facepalm*

Quaoar,

first: the name of the configuration file is *config.ini* - why you tried edit *default_config.ini* (Hint: Stellarium User Guide - http://www.stellarium.org/wiki/index.php/Advanced_Use#The_Main_Configuration_File)

second: screen_w and screen_h sets the display dimensional when application in windowed mode (Hint: Stellarium User Guide - http://www.stellarium.org/wiki/index.php/Configuration_file#Section_.5Bvideo.5D)

third: Stellarium used Qt framework for the GUI and if you want scaling GUI you should set environment variable for Qt, e.g. QT_DEVICE_PIXEL_RATIO=2 is for Qt. Rules for set environment variable is very different for different operating systems and you should find it yourself. For example I use Linux and I know how it can be set on linux.

final: Qt 5.3 has initial support of 4K monitors. I guess Qt 5.4 and, better, Qt 5.5 has more good support of 4K monitors. Apparently you need build Stellarium from source code with Qt 5.4.1 or Qt 5.5.

Members of Stellarium development team doesn't has any 4K monitors and we can't check support of those monitors.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

It's can be helpful - http://doc.qt.io/qt-5/highdpi.html

P.S. Next weekly build I'll create with Qt 5.4.1.

Revision history for this message
NickM (du6w9ghtj5) wrote :

Was about to log this - this is going to become a lot more prevalent with laptops starting to provide higher resolution. The fonts and icons need to be specified with DPI scaling not pixels. I hope this can be pushed up the priority list being over a year old :)

Revision history for this message
gzotti (georg-zotti) wrote :
Revision history for this message
Alexander Wolf (alexwolf) wrote :

A tentative fix has been committed in the trunk branch of Stellarium's Bazaar repository at Launchpad (few revisions).

Changed in stellarium:
milestone: none → 0.15.0
status: Confirmed → In Progress
Changed in stellarium:
status: In Progress → Fix Released
Revision history for this message
Alexander Wolf (alexwolf) wrote :

I've changed behaviour of support for HDPI devices.

Please check how latest beta is works with main/enable_hdpi_scaling = true in config.ini (and main/enable_hdpi_scaling = false of course).

Revision history for this message
Robert Jacobson (teridon) wrote :

I tried adding enable_hdpi_scaling to the config file, then restarting stellarium. AFAICT there was no effect. I tried both true and false values.

However, I was able to find a workaround in Windows, and that was to change the Compatibility settings on the Start Menu shortcut. i.e. open
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Stellarium
right-click on Stellarium and select Properties.
Select the Compatibility tab.
Check "Override high DPI scaling behvavior..."
From the "Scaling performed by" pulldown, select "System" (the other two settings -- Application and "System (Enhanced) -- don't work).

Note: I took the enable_hdpi_scaling line out of the config.ini, since it didn't seem to affect Stellarium on my computer.

Windows 10 version 1703, screen resolution 3840x2160, Stellarium 0.90.0.8999 x64.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.