Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI is not HiDPI aware #63

Open
colemickens opened this issue Dec 17, 2015 · 16 comments
Open

GUI is not HiDPI aware #63

colemickens opened this issue Dec 17, 2015 · 16 comments

Comments

@colemickens
Copy link

Are there any workarounds for this?
See screenshot. I have to squint quite hard to make things out.

https://i.imgur.com/xgqv54K.png

Thanks!

@juliandroid
Copy link

I see colemickens beat me to it, but I see no response so far and the lack of 4k / HiDPI support is not tolerable! It is really, really hard to read anything! I'm using Gnome Shell and Linux with 4k display.

Just compare the normal size text (in the browser) and what Yubikey personalization app shows! On 4k display the text in the browser looks with normal size, while the text in the Yubikey personalization looks unreadably tiny!!

yubikey

@AlexeyGusev
Copy link

same story here, version 3.1.24 is unusable on HiDPI display.

@klali
Copy link
Member

klali commented Sep 29, 2016

So unfortunately this tool is built with pixel sizes, so fixing this properly might take some work.

With QT 5.6 it should be possible to get the application to auto scale (like what happens on a mac) by setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR=1 when starting.

@AlexeyGusev
Copy link

Comment regarding QT 5.6 scaling is correct and this is what I am doing now; unfortunately, QT_AUTO_SCREEN_SCALE_FACTOR only takes integers, and value 2 is too big for my screen whilst 1 is too small.

@klali
Copy link
Member

klali commented Sep 29, 2016

http://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt details some different ways this can be controlled. Not sure how much it helps, but what I can offer in the short run.

@crrodriguez
Copy link

Workaround for the yubico released windows binaries is setting environment variable QT_DEVICE_PIXEL_RATIO to auto.

@gingerbreadassassin
Copy link

gingerbreadassassin commented Oct 29, 2016

Commenting to report same issue on Surface Pro. GUI is unusable. Is there any way to change the variable mentioned above without downloading QT studio, source code, and compiling?

Edit: adding " -platform windows:dpiawareness=0" to the end of the "Target" field of the shortcut properties seems to have fixed the issue on my SP4 running W10. It does look somewhat blurry, however.

@nagromc
Copy link

nagromc commented Dec 28, 2016

The issue exists as well on Ubuntu 16.04.1 Xenial LTS with a 3200x1800 @ 13.3" monitor (276 DPI).

In the Ubuntu settings, the ratio is set to 1.75 (under the Ajuster les menus et barres de titre label): http://imgur.com/4UStDfi

Example with the GitHub issue and the Google search homepage for comparision: http://imgur.com/epBbp9S

Using Yubico Personalization Tool v. 3.1.23 (the one provided in the official Ubuntu repo)

@emelbardis
Copy link

Same problem with Fedora 27 on XPS 13 HiDPI laptop. Super tiny GUI

@iam-TJ
Copy link

iam-TJ commented Aug 17, 2018

On Ubuntu 18.04 I found that using

QT_DEVICE_PIXEL_RATIO=auto

makes the application window taller than the available pixels, and as the window isn't resizeable the controls in the off-screen area are unreachable. It also reports as being deprecated

Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.

I then tried

QT_AUTO_SCREEN_SCALE_FACTOR=1

which is a boolean with the same result. I eventually found the solution with

QT_SCALE_FACTOR=1.5

@emelbardis
Copy link

I commented on this 2 years ago and it's still an issue.

@juliandroid
Copy link

juliandroid commented Mar 14, 2020

4 years ago - yubico are really-really fast fixing issues

@KywoSkylake
Copy link

And 2022 still not working

@foxycode
Copy link

2023 and still not working

@RCxRC1
Copy link

RCxRC1 commented Mar 14, 2023

This worked for me. Using a 2017 vintage HP x360 Spectre 15" with 16:9 aspect ratio screen, 4k UHD, running Windows 10 v. 22H2.

  • Start menu --> "YubiCo" folder --> Right click on "Yubikey Personalization Tool" --> More --> Open file location

(opens actual shortcut folder)

  • Right click shortcut for "Yubikey Personalization Tool" --> Properties --> "Compatibility" tab --> (at bottom) "Change high DPI settings" button --> (pop-up dialog box) (at bottom) Check box for "Override high DPI scaling behavior" --> toggle option for either "System" or "System (enhanced)" --> apply --> OK

Double click shortcut to test.

The aspect ratio of the initial tiny, illegible box (which originally appeared on my screen as 3-3/16" (3.1875") x 2-3/4 (2.75") for a ratio of .86) changed slightly to .83 or so after the change (7-7/8" (7.875") x 6-9/16" (6.5625") for a ratio of .83 or so), but the app is much more usable than before. I haven't found any options / toggle buttons / margins unusable yet, but please advise if any issues are found that I may have missed.

Regards,

RC

P.S. Granted this is only a Windows solution (vs Linux or Ubuntu, etc), but it might help someone else out there.

@AOrps
Copy link

AOrps commented Feb 7, 2024

If using Ubuntu, try changing the Exec line in the file /usr/share/applications/yubikey-personalization-gui.desktop from

Exec=yubikey-personalization-gui

to

Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=2 yubikey-personalization-gui

Note: This will only change when rendered from search not the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests