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

Fix the units report when there are many units #2318

Closed
wants to merge 1 commit into from

Conversation

lmoureaux
Copy link
Contributor

Split the window horizontally instead of vertically, which facilitates scrolling.

Closes #2313.

Split the window horizontally instead of vertically, which facilitates
scrolling.

Closes longturn#2313.
@lmoureaux lmoureaux requested a review from jwrober July 7, 2024 19:43
@blabber
Copy link
Collaborator

blabber commented Jul 8, 2024

Works as intended, but the layout is a little inconsistent now:
before

I have hacked this together on view_units.ui:
after

What do you think?

@lmoureaux
Copy link
Contributor Author

I agree that your proposed layout looks better. Does it look ok when no units are waiting?

@blabber
Copy link
Collaborator

blabber commented Jul 8, 2024

The "units waiting" group is hidden in this case. Feel free to test my proposal (which is a good idea anyways): blabber/freeciv21@38f5dea

@jwrober
Copy link
Collaborator

jwrober commented Jul 17, 2024

@hugomflavio and I worked together to evaluate this PR as well. There are a few things we need to think about on this before its ready if we keep the change horizontally opposed:

  1. The new UI group should have a spacer in it that is the same as the button bar so the two tables are horizontally aligned
  2. The vertical spacer should be a slider so the player can expand/contract each side as needed - this is super important on smaller displays
  3. The units waiting table should by default push over the empty space on the units table and leave very little slack

All that said, I personally would prefer that units waiting is vertically opposed to units like I did it initially. It works best on smaller displays, which we have many players in this category. Setting some limiters so the units table can't take up the whole screen and bury the units waiting table when there are many units in both tables is important. My thinking is when units waiting is present we change the geometry of the units table so it is max half screen "tall" with a horizontal slider in the middle. Then we see the units waiting table at the bottom half, the default slider in the middle is at mid-screen and should allow the player to slide up/down to see more/less of each table on the screen as needed.

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see note above

@jwrober
Copy link
Collaborator

jwrober commented Jul 17, 2024

Another alternative idea is to change the view to a tabbed interface with units table on one tab and units waiting on a second. Then each table can use the whole screen.

@lmoureaux
Copy link
Contributor Author

A resizeable split screen can be done with a QSplitter. Closing this PR as the required changes go in a vastly different direction.

@lmoureaux lmoureaux closed this Jul 18, 2024
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.

UWT table collapses to one row if enough unit types exist
3 participants