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

All Ui:s must now have a finite max_rect

Deprecated `max_rect_finite`, `available_size_before_wrap_finite`
and `available_rect_before_wrap_finite`.
This commit is contained in:
Emil Ernerfeldt
2021-08-28 16:02:16 +02:00
parent 105b999cb6
commit 9def6ef6df
18 changed files with 99 additions and 116 deletions

View File

@@ -68,7 +68,7 @@ pub fn item_ui(ui: &mut Ui, item: easy_mark::Item<'_>) {
let where_to_put_background = ui.painter().add(Shape::Noop);
let mut rect = ui.monospace(code).rect;
rect = rect.expand(1.0); // looks better
rect.max.x = ui.max_rect_finite().max.x;
rect.max.x = ui.max_rect().max.x;
let code_bg_color = ui.visuals().code_bg_color;
ui.painter().set(
where_to_put_background,