Skip to content

Right-aligning labels in their grid cells #3175

Answered by barometz
barometz asked this question in Q&A
Discussion options

You must be logged in to vote

Mostly resolved by using tables, which seems like a more sensible fit for the problem anyway:

        egui_extras::TableBuilder::new(ui)
            .columns(egui_extras::Column::auto(), 5)
            .striped(true)
            .cell_layout(egui::Layout::default().with_cross_align(egui::Align::RIGHT))

This runs into some issues with the way columns are autosized (~resolved by ui.spacing_mut().item_spacing.x += 5.0;), but that's a story for another day.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by barometz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants