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 font/scale too small #123

Closed
Seegras opened this issue Nov 27, 2021 · 19 comments
Closed

GUI font/scale too small #123

Seegras opened this issue Nov 27, 2021 · 19 comments
Assignees
Labels
bug Something isn't working

Comments

@Seegras
Copy link

Seegras commented Nov 27, 2021

Linux Distribution

debian/sid

Luxtorpeda Version

47.0

Bug description

Default scale of the GUI is tiny on 4K.
Luxtorpeda-TooSmall

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 Seegras added the bug Something isn't working label Nov 27, 2021
@d10sfan d10sfan self-assigned this Nov 28, 2021
@d10sfan
Copy link
Member

d10sfan commented Nov 28, 2021

@Seegras Interesting, I will take a look at this when I have a chance.

@d10sfan
Copy link
Member

d10sfan commented Nov 28, 2021

@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

@d10sfan d10sfan closed this as completed Nov 28, 2021
@d10sfan
Copy link
Member

d10sfan commented Nov 28, 2021

version 48 has been released as well.

@Seegras
Copy link
Author

Seegras commented Dec 15, 2021

looking good.

@neuromancer
Copy link

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%)

@d10sfan
Copy link
Member

d10sfan commented May 7, 2022

@neuromancer

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.

@neuromancer
Copy link

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  

@d10sfan
Copy link
Member

d10sfan commented May 7, 2022

@neuromancer

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.

luxtorpeda.zip

@d10sfan
Copy link
Member

d10sfan commented May 7, 2022

@neuromancer
luxtorpeda.tar.xz.zip

Above is an updated build, had one more fix that should help with it.

@neuromancer
Copy link

I test this potential fix using the dpi-fix branch and this is the result (still very small):

image

@d10sfan
Copy link
Member

d10sfan commented May 7, 2022

@neuromancer

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.

@d10sfan
Copy link
Member

d10sfan commented May 8, 2022

@neuromancer

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

@neuromancer
Copy link

It looks a little better: the window is larger, but the font is tiny (which is the main issue here)

image

@d10sfan
Copy link
Member

d10sfan commented May 8, 2022

@neuromancer

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.

luxtorpeda.tar.xz.zip

@neuromancer
Copy link

It works!

image

Btw, I cannot move the window for some reason. I will try to reproduce this with master, because it is annoying, but the GUI is now large enough. Thanks!

@d10sfan
Copy link
Member

d10sfan commented May 8, 2022

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.

@d10sfan
Copy link
Member

d10sfan commented May 8, 2022

@neuromancer

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

luxtorpeda.tar.xz.zip

@neuromancer
Copy link

Yeap, the window is centered (the screenshot was took cutting the rest of the screen). The latest build works fine AFAIK.

@d10sfan
Copy link
Member

d10sfan commented May 9, 2022

@neuromancer

Thanks for the help in testing, I've released those fixes with version 53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants