aardwolfclientpackage icon indicating copy to clipboard operation
aardwolfclientpackage copied to clipboard

IDEA: Adjust client to run in modern screen resolutions

Open biz411 opened this issue 1 year ago • 7 comments

aardwolf-mushclient Please review the attached image.

SUGGESTIONS / IDEAS

I have a 2K, 1440p 32 inch monitor and my face is 42 inches away from my monitor. This is my first run of the client. Everything is tiny (like buttons) and I cannot read the font. I tried to increase the font size in the settings, but it did nothing. This client is not usable for me because I cannot read anything without getting super close to my monitor and I of course cannot play like that. It takes a lot of effort to adjust the boxes to fit my screen. It would be really nice if the boxes would automatically use the available space and fit inside the client window.

biz411 avatar Aug 27 '24 16:08 biz411

Thank you for writing this up. I'm open to the idea.

In the meantime...

I tried to increase the font size in the settings, but it did nothing.

Miniwindow font sizes are controlled on a per-miniwindow basis. You can right-click on each of them to set their fonts.

It takes a lot of effort to adjust the boxes to fit my screen.

I have a hard time believing that it takes "a lot of effort" to click and drag a few corners.

fiendish avatar Sep 04 '24 15:09 fiendish

Though this has been a while open, Danj brought to my attention DPI issues with windows. Perhaps the following can be applied to window creation with the Aardwolf Client Package. I'd submit a PR, but you would likely have a better implementation strategy for this:

BASE_DPI = 96
scaleX = GetDeviceCaps(88) / BASE_DPI
scaleY = GetDeviceCaps(90) / BASE_DPI

function sx(px)
	return math.floor(px * scaleX + 0.5)
end

function sx(px)
	return math.floor(px * scaleY + 0.5)
end

Then anywhere you have an X,Y value, you replace it with sx(...) and sy(...) respectively. I think overall it would be a significant addition.

AardCrowley avatar Jun 06 '25 15:06 AardCrowley

Hm. Does Windows not do autoscaling for old win32 applications?

fiendish avatar Jun 06 '25 18:06 fiendish

I don't think that MUSHClient is DPI-Aware, and as such, it's treated as a legacy application that Windows will only adjust scaling for the main program window itself. Windows generated within the main program window do not scale at all, and in nearly all cases, they are pixel-precise with fixed pixel positioning. So, 500x500 is still 500x500 no mater what resolution you choose.

It's why in the screenshot you see so much empty space - not because the OP shrunk everything down, but because the main program received the upscaled resolution notice but the windows within did not.

AardCrowley avatar Jun 06 '25 18:06 AardCrowley

But people can resize and move windows around as they see fit. If the actual elements themselves aren't too small to interact with, then I don't really see the problem.

fiendish avatar Jun 13 '25 16:06 fiendish

Specifically:

Everything is tiny (like buttons) and I cannot read the font.

This doesn't make sense to me. I can read everything in the screenshot, and my screen is half the size of OP's, which means that elements in the screenshot appear substantially smaller on my screen than they would for OP because the image is shrunken. It sounds like OP has poor eyesight, which can be accommodated through personal customization but isn't a problem that I think makes sense to solve by changing default settings.

Am I wrong?

fiendish avatar Jun 13 '25 16:06 fiendish

I don't think that you're wrong in that regard. However...

I would argue it's not changing default settings. Default settings remain the default. The higher the resolution, though, the smaller the internal windows become and the greater the empty space. Conversely, the smaller the resolution, the more crowded it becomes. With the scaling functions, however, it would simply adjust the windows to scale, so 500x500 would become 2000x2000 pixels with a DPI of 384, for example. Then the end-user would be able to resize as desired. This would only apply when there is no settings for windows stored. Once the window size has been stored, never have to look at the scaling again (unless you wanted to call the scaling function every time, even on user-settings).

The request that I received from Danj was regarding font/text being cut off due to static window sizes in high DPI systems. Ultimately, I suppose this comes down to a convenience/QoL upgrade. If a player does not wish to have all that open space, they would need to resize up to 7 windows to fill in the gaps. I personally have a couple of layouts saved depending on the resolution I'm working with - when I'm at home, I remote in from my Linux server and have it displayed on my 51" TV. Resolution is 3000x2000, so I resize things to be able to read. When I remote in from work, my resolution drops to 1920x1200, so I have to resize to accommodate for that as well.

It's really up to you if you want to introduce an automatic scaling factor, though.

AardCrowley avatar Jun 13 '25 17:06 AardCrowley