1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

Add Align2::anchor_size (#3863)

This commit is contained in:
Emil Ernerfeldt
2024-01-22 16:47:50 +01:00
committed by GitHub
parent 9fb83d3541
commit 31cc31a67b
4 changed files with 21 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ impl Shape {
color: Color32,
) -> Self {
let galley = fonts.layout_no_wrap(text.to_string(), font_id, color);
let rect = anchor.anchor_rect(Rect::from_min_size(pos, galley.size()));
let rect = anchor.anchor_size(pos, galley.size());
Self::galley(rect.min, galley, color)
}