GUI font/scale too small
Seegras opened this issue · comments
Linux Distribution
debian/sid
Luxtorpeda Version
47.0
Bug description
Default scale of the GUI is tiny on 4K.
Not sure where it takes the DPI/Resolution from.
Steps To Reproduce
Use 4K-Monitor
Expected Behavior
Scale, see the steam-window in the background, which does scale.
Additional Context
No response
Relevant log output
No response
@Seegras I believe I have this fixed, let me know if the build here fixes it: https://github.com/luxtorpeda-dev/luxtorpeda/actions/runs/1511819525
If not, please provide logs, as I added some traces for what it sets for the dpi scaling.
These changes will also be on the next public build.
window is on display_index: 0
found dpi: (143.66042, 143.43529, 144.37895)
using dpi scaling of 1.8705784
version 48 has been released as well.
looking good.
I tested luxtorpeda from git using the aur package and it seems too small (I have a big TV). Perhaps it is caused by using gnome scaling? (300%)
Could you try the latest official release in the github releases (https://github.com/luxtorpeda-dev/luxtorpeda/releases/tag/v52)? Just to make sure you're on the latest code.
If that does not change anything, please open steam in a terminal window and provide the output when running luxtorpeda with a game that provides choices. You're looking for something similar to this:
window is on display_index: 0
found dpi: (143.66042, 143.43529, 144.37895)
using dpi scaling of 1.8705784
The dpi scaling is calculated from the DPI found from sdl2, so it's possible that calculation may need to be changed.
I'm testing this with wetlands
creating: "/run/user/1000/luxtorpeda/1367160.pid"
luxtorpeda version: 52.0.0
steam_app_id: "1367160"
original command: ["/home/g/.local/share/Steam/steamapps/common/Wetlands/DOSBox/DOSBox.exe", "-conf", "dosbox_fs.conf", "-noconsole", "-exit"]
working dir: Ok("/home/g/.local/share/Steam/steamapps/common/Wetlands")
tool dir: "/usr/share/steam/compatibilitytools.d/luxtorpeda"
user_packages_file not found
game info using default
user_packages_file not found
game info using default
showing engine choices
8 joysticks available
Attempting to open controller 0
controller name is USB BFM GAMEPAD
Success: opened "USB BFM GAMEPAD"
Controller connected mapping: 03000000c31100000455000011010000,USB BFM GAMEPAD,a:b0,b:b1,x:b3,y:b4,back:b10,guide:b12,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,lefttrigger:a2,righttrigger:a3,platform:Linux
controller assumed to be xbox
window is on display_index: 0
found dpi: (68.661476, 288.0, 288.0)
using dpi scaling of 0.8940297
found dpi: (68.661476, 288.0, 288.0)
In case is useful, my current resolution from xrandr:
$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1420mm x 800mm
3840x2160 30.00 + 59.94* 50.00 29.97 25.00 23.98
That's interesting, normally the DPI tuple has had the three numbers at roughly the same value. It's the diagonal, horizontal, and then vertical DPI (https://wiki.libsdl.org/SDL_GetDisplayDPI).
Currently, it's using only the diagonal version in its calculation. I've made a possible fix that has it use the largest value instead. Could you try this build and see if it fixes it for you? As well, if you could provide the latest log information on this version.
@neuromancer
luxtorpeda.tar.xz.zip
Above is an updated build, had one more fix that should help with it.
The dpi scaling number looks a lot better although it seems like the window itself is too small. The high dpi setting from sdl is enabled so there may need to be another change to scale the resolution of the window itself. I'll take another look and let you know.
Can you try the following build out? It tries to scale the width and height of the window itself based on the DPI given.
luxtorpeda.tar.xz.zip
I tried something in addition, which also scales the dpi scaling based on the new window width, it should cause the dpi scaling value to be 9, which should make the text bigger. Let me know how that goes, thanks. If that does not improve it, let me know what the logs say.
Great that's looking alot better. Are you on x11 or wayland? On my system it centers the window so not sure why that's happening. If it's on x11 I can trigger a window centering once it's created.
Can you try this build? I added an sdl2 command to center the window position once it's open. The window is always centered already on my systems but it may help with what you are seeing.
The window isn't movable on purpose but it should be centered
Yeap, the window is centered (the screenshot was took cutting the rest of the screen). The latest build works fine AFAIK.
Thanks for the help in testing, I've released those fixes with version 53.