LubosD / twinkle

Qt 5 port of Twinkle

Home Page:http://twinkle.dolezel.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

twinkle overlay does not follow the 200% zoom on screenresolution

Cyborgscode opened this issue · comments

Hi,

the call overlay window does not follow the 200% zoom. This makes it very small on a 3k-8k display, too small to be used i.e. on a touch display.

Bildschirmfoto von 2022-07-01 17-45-38

(Image is from a 3k Surface Tablet)

the call overlay window does not follow the 200% zoom.

Am I correct in assuming that this also affects the incoming call popup, as well as Twinkle as a whole? (The OSD and incoming call popup are coded differently from the rest of the application, but they should all behave the same AFAIK. Let me know if this is not the case for you.)

From what I understand, you need to manually enable Qt's High-DPI mode by using the QT_AUTO_SCREEN_SCALE_FACTOR environment variable:

QT_AUTO_SCREEN_SCALE_FACTOR=1 twinkle

If the resulting scaling factor is wrong, you can override it with QT_SCALE_FACTOR:

QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2.0 twinkle

I don't have a high-DPI display to test this with, but using a 2.0 factor on a normal display does indeed make everything (application and popups) twice as large.

For more information, you can refer to the Arch Linux wiki's HiDPI entry.

(For the record, AIUI, this is disabled by default in Qt 5 for compatibility reasons, but is automatically enabled in Qt 6.)

This may work for me, but I'm pretty sure, no distribution will add this to it's default desktop.file .

And the users won't read or even find this issue and workaround here. I think, you need to implement it to the startupcode of twinkle yourself, depending on the optical environment you detect.

Hmm, I guess each application is supposed to individually enable this on its own, after confirming that it does indeed behave correctly in this situation. This is what I observed after browsing the source of several Qt applications.

So, since I have no high-DPI display for testing, you confirm that everything looks fine (without the need to override QT_SCALE_FACTOR)? Qt warns of the possibility of "some scaling or painting artifacts"; nothing weird caught your eye?

All Test without any QT env variables:

The Image above is taken from a 3k display with 200% UI Scaling in Gnome.

The APP UI is ok, the ring overlay is the problem.

On the Pinephone, with no HDPI display ( 1440x720 ) but 200% the situation is... wired :)


1. TEST with unlocked screen: 
    The overlay is not at the upper right corner, it's in the MIDDLE topwise with left=0 
2. TEST with locked screen and sleep mode
    The overlay is  at the upper LEFT corner
    There is no notification about the call on the lockscreen.
    As the phosh team is building a new pluginsystem for the lockscreen, it's worth a shot to read this: 
    http://honk.sigxcpu.org/con/On_a_road_to_Prizren_with_a_Free_Software_Phone.html
    if you want Twinkle become the #1 softphone for SIP on mobile devices, which would not be that hard to do ;)

The size is "useable", but too small for a mobile touch device overall.
A fullscreen ring overlay dialog would be preferable, configureable via prefs ideal.

All Test without any QT env variables:

The Image above is taken from a 3k display with 200% UI Scaling in Gnome.

The APP UI is ok, the ring overlay is the problem.

And does the overlay double in size when using the environment variables?

On the Pinephone, with no HDPI display ( 1440x720 ) but 200% the situation is... wired :)

At such a resolution, I can't say I'm surprised.

As the phosh team is building a new pluginsystem for the lockscreen

I understand that your overall goal is basically "make Twinkle usable on a touch device", but this discussion has veered quite far from the initial "the overlay doesn't scale like it should" issue. I'd like to focus on this first.

Result 1: Pinephone "QT_AUTO_SCREEN_SCALE_FACTOR=n twinkle" with n=1 and n=2 have no influence on the result.

Result 2: Surface 3k "QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2.0 twinkle"

worked, the ring overlay is now "somewhere" on the screen ( left upper area, but not at the edges )
The overlay was way bigger, maybe a bit too big, but for a touchscreen it's still ok.

Result 2: Surface 3k "QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2.0 twinkle"

Can you confirm that QT_AUTO_SCREEN_SCALE_FACTOR=1 twinkle works just as well on the tablet?

the ring overlay is now "somewhere" on the screen ( left upper area, but not at the edges )

Are you talking about the popup for an incoming call (normally at the center of the screen) or the one during a call (top right, as seen in your screenshot)? Better yet, could you make sure to check them both? Thanks!