Skip to content

Grid layout intracell alignment#269

Merged
hpjansson merged 3 commits intohpjansson:masterfrom
AnonymouX47:grid-layout-alignment
Apr 25, 2025
Merged

Grid layout intracell alignment#269
hpjansson merged 3 commits intohpjansson:masterfrom
AnonymouX47:grid-layout-alignment

Conversation

@AnonymouX47
Copy link
Contributor

  • Implements intracell alignment for the grid layout i.e --grid now respects --align within each cell.
    • Adds halign and valign fields to GridLayout.
    • Adds grid_layout_set_align().
  • Defines separate alignment defaults for grid and non-grid layouts.
before after
Screenshot_2025-04-23_08-57-02 Screenshot_2025-04-23_08-57-44

Resolves #258, while taking #253 (comment) into consideration.

@hpjansson
Copy link
Owner

Thanks! It looks good to me. Would you rather these three PRs get committed together, or is it fine to do one at a time?

@AnonymouX47
Copy link
Contributor Author

My pleasure. 😃

Not much changes, so I think a squash will be okay so far the new commit message links to this PR 🤔. The breakdown will always be here.

@AnonymouX47
Copy link
Contributor Author

One thing I forgot to mention... I think we should consider making bottom (vertical END) alignment the default for the non-grid layout also. 🤔

@hpjansson
Copy link
Owner

One thing I forgot to mention... I think we should consider making bottom (vertical END) alignment the default for the non-grid layout also. 🤔

That sounds good to me!

I think I'll start pushing your PRs one at a time when ready, it just means you may have to rebase or resolve conflicts if there are any.

@AnonymouX47
Copy link
Contributor Author

One thing I forgot to mention... I think we should consider making bottom (vertical END) alignment the default for the non-grid layout also. 🤔

That sounds good to me!

Okay, we should do that after this PR is merged.

I think I'll start pushing your PRs one at a time when ready, it just means you may have to rebase or resolve conflicts if there are any.

No problem at all. Already figured that would occur.

@AnonymouX47 AnonymouX47 force-pushed the grid-layout-alignment branch from 1ecc6cb to cec8d72 Compare April 25, 2025 13:50
@AnonymouX47
Copy link
Contributor Author

Rebased ✅

@hpjansson hpjansson merged commit 962520f into hpjansson:master Apr 25, 2025
1 check passed
@AnonymouX47 AnonymouX47 deleted the grid-layout-alignment branch April 25, 2025 14:08
@AnonymouX47
Copy link
Contributor Author

One thing I forgot to mention... I think we should consider making bottom (vertical END) alignment the default for the non-grid layout also. 🤔

That sounds good to me!

Unfortunately, it turns out this won't be good as a default because of the vertical spaces added before each image.

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.

Intracell alignment for --grid

2 participants