Skip to content

group: add align option to control children alignment (#2834) - #5282

Open
dominikake wants to merge 1 commit into
Alexays:masterfrom
dominikake:group-align-option
Open

group: add align option to control children alignment (#2834)#5282
dominikake wants to merge 1 commit into
Alexays:masterfrom
dominikake:group-align-option

Conversation

@dominikake

Copy link
Copy Markdown

Summary

Adds an optional align property to the group module to control how its
children are aligned within the group's box.

  • Values: start | center | end
  • Default: center (preserves current behavior)

This lets a group placed in modules-left left-align its contents instead of
centering them, as requested in #2834.

Implementation

  • include/group.hpp: add Gtk::Align align_ (default ALIGN_CENTER).
  • src/group.cpp: read config_["align"] in the constructor (throws on
    invalid value, matching the existing orientation handling), and apply
    widget.set_halign(align_) to each child in addWidget().
  • man/waybar.5.scd.in: document the new option.

Notes

I could not build/test this locally (no build toolchain in my environment), so
this relies on CI. If maintainers would prefer start as the default to fully
resolve #2834 out of the box, I'm happy to flip the default.

Co-Authored-By: opencode noreply@opencode.ai

Adds an optional `align` property to the group module
("start" | "center" | "end", default "center"). Children are
aligned within the group's box accordingly, so a group placed in
`modules-left` can left-align its contents instead of centering them.

Resolves the request in Alexays#2834.

Co-Authored-By: opencode <noreply@opencode.ai>
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.

Center aligned content in modules-left

1 participant