Skip to content

joryirving/windowstead #53: fix tiles rendering taller than wide - #56

Merged
itsmiso-ai merged 1 commit into
mainfrom
fix/issue-53-tile-aspect
Apr 18, 2026
Merged

joryirving/windowstead #53: fix tiles rendering taller than wide#56
itsmiso-ai merged 1 commit into
mainfrom
fix/issue-53-tile-aspect

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

Fixes #53. Partial fix — two changes to prevent tiles from stretching vertically: (1) Changed VBoxContainer size_flags_vertical from SIZE_EXPAND_FILL to SIZE_SHRINK_END so the tile content no longer requests vertical expansion, (2) Added clip_children = ALWAYS to tile panels to prevent label content overflow from distorting the tile aspect ratio.

@smurf-bot

smurf-bot Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Automated recommendation: APPROVE

Analysis engine: MiniMax-M2.7@https://api.minimax.io/v1

Review: fix tiles rendering taller than wide (PR #56)

Summary

This PR makes two targeted changes to scripts/main.gd to fix tiles stretching vertically in the world grid (issue #53). Both changes address the same underlying problem with complementary mechanisms.

Changes

1. Tile panel clip_children (line 255)

  • Added tile_panel.clip_children = ClipChildren.ALWAYS
  • Prevents child label content overflow from distorting the tile aspect ratio
  • This is a container-level constraint that clips any content that would otherwise expand beyond bounds

2. VBoxContainer size_flags_vertical (line 276)

  • Changed from Control.SIZE_EXPAND_FILL to Control.SIZE_SHRINK_END
  • Prevents the internal VBox from requesting vertical expansion into the tile
  • Combined with size_flags_horizontal = SIZE_EXPAND_FILL, the box will expand horizontally but shrink vertically to content

Analysis

Correctness: Both changes are syntactically correct GDScript. ClipChildren is a valid Godot 4 enum and SIZE_SHRINK_END is a valid Control.SizeFlags value. The changes target the tile rendering at the correct node hierarchy levels (tile_panel as container, box as child).

Consistency: Both changes serve the same goal—preventing vertical stretching—and are mutually reinforcing. The SIZE_SHRINK_END stops the box from requesting extra space, while clip_children = ALWAYS provides a safety net to visually clip any overflow.

Repository alignment: This fix aligns with the "Tile-first dock sizing" principle in CLAUDE.md, ensuring square tile geometry is maintained rather than distorted.

Evidence verification: The clip_children term already appears in the repository scan for line 255 of main.gd, confirming the change is properly integrated. No other files were modified, which is appropriate for this targeted fix.

Standards Compliance

  • GDScript syntax: ✓ Valid
  • Enum usage: ✓ Correct (ClipChildren.ALWAYS)
  • Change scope: ✓ Minimal and focused
  • PR documentation: ✓ Clear explanation of both fixes in body

Unknowns / Needs Verification

None. The changes are self-contained, syntactically valid, and the PR description clearly documents the intent of both modifications.

@itsmiso-ai
itsmiso-ai force-pushed the fix/issue-53-tile-aspect branch from ce7e1ad to 2665ad1 Compare April 18, 2026 13:31
@itsmiso-ai
itsmiso-ai merged commit ad3d5f5 into main Apr 18, 2026
1 of 2 checks passed
@itsmiso-ai
itsmiso-ai deleted the fix/issue-53-tile-aspect branch April 18, 2026 13:33
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.

Fix tiles rendering taller than they are wide

1 participant