Skip to content

Dynamic portrait scaling for large parties#53

Open
BelegCufea wants to merge 3 commits intofactubsio:masterfrom
BelegCufea:feature/portrait-layout-logic
Open

Dynamic portrait scaling for large parties#53
BelegCufea wants to merge 3 commits intofactubsio:masterfrom
BelegCufea:feature/portrait-layout-logic

Conversation

@BelegCufea
Copy link

Fix: Dynamic portrait scaling for large parties

Goal: Prevent portraits from spilling off the screen when the party size increases.

Why this is needed

With mods like MorePartySlots or parties heavy on Animal Companions, the portrait row often exceeds the screen width. This fix ensures the UI remains functional regardless of party size.

Key Changes

  • Responsive Scaling: Calculates portrait height based on available screen width and current party size.
  • Auto-Fit: Portraits now shrink dynamically as the group grows so everyone remains visible.
  • Height Clamping: Added a min/max height range (60px–165px) to maintain visual consistency.

Compatibility & Testing

  • Tested Resolution: Verified at 1920x1080.
  • Scaling: The logic uses parent container width and relative anchors, so it should scale correctly across all resolutions.

Note: These changes currently apply only to target portraits. I can apply similar logic to caster portraits next if this is approved!

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.

1 participant