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

Improve sizing and scrolling of the unit choice popup #2287

Merged
merged 1 commit into from
May 21, 2024

Conversation

lmoureaux
Copy link
Contributor

The unit selection popup for stacks in the open (and in allied cities) didn't behave very well with many units: its width remained fixed to 4 and it was showing at most 12 units -- quite a small stack for a serious attack. In addition, the last row was in some cases inaccessible due to a scrolling bug (maybe Wayland-specific; #2285).

Increase the base width of the menu to 5 units (a loaded Galleon), and further to 6 when there are more than 25 units. Show up to 36 units (four fully loaded Transports) at once before resorting to scrolling.

Fix the scrolling bug, which was related to scroll events with deltaY=0 being interpreted as scrolling upwards.

Closes #2285.


This was likely already a bug in 3.0, so we should consider backporting the fix if there is another dot release.

The unit selection popup for stacks in the open (and in allied cities)
didn't behave very well with many units: its width remained fixed to 4
and it was showing at most 12 units -- quite a small stack for a serious
attack. In addition, the last row was in some cases inaccessible due to
a scrolling bug (maybe Wayland-specific; longturn#2285).

Increase the base width of the menu to 5 units (a loaded Galleon), and
further to 6 when there are more than 25 units. Show up to 36 units
(four fully loaded Transports) at once before resorting to scrolling.

Fix the scrolling bug, which was related to scroll events with deltaY=0
being interpreted as scrolling upwards.

Closes longturn#2285.
@jwrober
Copy link
Collaborator

jwrober commented May 21, 2024

I never get more than 4 columns
image

There are 46 Howitzers on the tile. Other than that seems to work.

@lmoureaux
Copy link
Contributor Author

Hmm, this 12-units layout looks like the old behavior... are you sure the patch is applied?

@jwrober
Copy link
Collaborator

jwrober commented May 21, 2024

No one saw anything... :)

image

@jwrober jwrober merged commit 5612c6d into longturn:master May 21, 2024
22 checks passed
@lmoureaux lmoureaux deleted the bugfix/many-units branch May 21, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't select units in the last row when there are more than 12 on a tile
2 participants