RMahjong only supports the 1024x768 resolution

Bug #675944 reported by Alex Elsayed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RMahjong
Fix Committed
Medium
Unassigned

Bug Description

I have implemented a slightly hackish solution, which works for me at both 1024x768 (at which it is pixel-identical to the current code) and 1680x1050. I checked which dialogs were horizontally centered, and did some math so that they would be centered regardless of display width. Vertical position is still less than optimal, as I used a rather simplistic adjustment system. ( ( ( yres - 768 ) / 6 ) + orig_ypos ). Together with the fact that the resolution is still hardcoded (albeit in only two locations now, and it doesn't break if you change them), that explains why I referred to it as 'slightly hackish'. Making it possible to resize it while running would require deeper changes, and I don't understand the codebase well enough. However, I believe it *would* be relatively simple to make it able to read these values from a config file, and default to 1024x768 if it's not present. Patch attached.

Related branches

Revision history for this message
Alex Elsayed (eternaleye) wrote :
Revision history for this message
Stanislav Böhm (spirali) wrote :

Thank you for your patch (and other bug reports).
I plan to implement the resolution changing in next two weeks and I will probably use your patch as the base for this feature.

Changed in rmahjong:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Alex Elsayed (eternaleye) wrote :

Glad my patch was helpful! Thanks for making a great program.

Revision history for this message
Stanislav Böhm (spirali) wrote :

I have commited the code into the main repository that solves this problem. There is no configuration file but you can freely resize the client's window. The desktop resolution is used in the fullscreen mode.

Changed in rmahjong:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.