Skip to content

Align Tiles in last row with previous row#4407

Merged
ThomasMichon merged 4 commits intomicrosoft:masterfrom
ThomasMichon:tiles-alignment
Apr 4, 2018
Merged

Align Tiles in last row with previous row#4407
ThomasMichon merged 4 commits intomicrosoft:masterfrom
ThomasMichon:tiles-alignment

Conversation

@ThomasMichon
Copy link
Copy Markdown
Member

@ThomasMichon ThomasMichon commented Mar 29, 2018

Overview

This change adds an elegant alignment behavior to TilesList to make regular grids look better.
If there are fewer tiles in the last row of a grid than are needed to fill the row, 'phantom' tiles are computed with an average width of the current tiles in the row until the row is 'full'. Then a new scale factor is selected based on the addition of the phantom tiles. The effect is that tiles in the last row will tend to line up with tiles above them, if the tiles all have the same size.

Before:
image
After:
image

@ThomasMichon ThomasMichon self-assigned this Mar 30, 2018
@lynamemi
Copy link
Copy Markdown
Collaborator

Sounds like a nice polish! Can you post before and after screenshots?

Copy link
Copy Markdown
Collaborator

@lynamemi lynamemi left a comment

Choose a reason for hiding this comment

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

Looks good to me. Could you add some comments to TilesList describing your phantom tile strategy?

Copy link
Copy Markdown
Collaborator

@lynamemi lynamemi left a comment

Choose a reason for hiding this comment

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

Great comments, thank you!

@ThomasMichon ThomasMichon merged commit cb8ba39 into microsoft:master Apr 4, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants