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

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

Closed
lmoureaux opened this issue May 16, 2024 · 0 comments · Fixed by #2287
Closed

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

lmoureaux opened this issue May 16, 2024 · 0 comments · Fixed by #2287
Labels
bug Something isn't working gui This issue requires changes to the user interface
Milestone

Comments

@lmoureaux
Copy link
Contributor

Describe the bug
When there are more than 12 units on a tile, the units in the last row of the unit chooser popup cannot be selected

To Reproduce
Steps to reproduce the behavior:

  1. Stack 20 units outside a city, or in an allied city
  2. Click on the tile
  3. Scroll down to the bottom
  4. Try to click on some unit
  5. See it's impossible because the scroll position isn't maintained

Expected behavior
It's possible to select any unit on a tile is possible.

Platform and version (please complete the following information):

  • OS: Linux
  • Freeciv21 version: b7959dd
  • Ruleset/Longturn game (if applicable): LT82
  • Tileset: RoundSquare
@lmoureaux lmoureaux added bug Something isn't working gui This issue requires changes to the user interface labels May 16, 2024
@lmoureaux lmoureaux added this to the v3.1-stable milestone May 16, 2024
lmoureaux added a commit to lmoureaux/freeciv21 that referenced this issue May 20, 2024
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 pushed a commit that referenced this issue May 21, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gui This issue requires changes to the user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant