google / xsecurelock

X11 screen lock utility with security in mind
Apache License 2.0
863 stars 65 forks source link

Missing HIDPI scale #146

Closed coffebar closed 1 year ago

coffebar commented 2 years ago

Text is too small on the HDPI Display. I have env variables set that makes other programs scale properly:

GDK_SCALE=2
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS="2"
QT_FONT_DPI=200

Please make something for scaling or changing font size.

vincentbernat commented 1 year ago

xsecurelock is not using these toolkits. However, it is using Xft and Xft will respect the Xft.dpi resource. So, you need to set it to 192 to have the correct scale.

coffebar commented 1 year ago

On laptop, i can connect or disconnect external displays with a DPI much different from laptop's display. I can control with bash scripts which program to run, but changing the xorg settings is not convenient option in this case. If the program had an option (parameter) to increase the font size, that would be great.

vincentbernat commented 1 year ago

You can use echo Xft.dpi: 192 | xrdb.

coffebar commented 1 year ago

it will messed up everything else

coffebar commented 1 year ago

I have found a solution. Font size can be changed with font option:

XSECURELOCK_FONT='monospace:size=22' xsecurelock