1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Calculate preferred size from Galley; Pass it back up the Uis, Frames, etc..

This commit is contained in:
Lucas Meurer
2025-03-04 22:51:55 +01:00
parent 80d218cf71
commit 166e8e2092
30 changed files with 198 additions and 92 deletions

View File

@@ -1,3 +1,4 @@
use eframe::emath::Vec2;
use egui::util::History;
pub struct FrameHistory {
@@ -62,7 +63,7 @@ impl FrameHistory {
// TODO(emilk): we should not use `slider_width` as default graph width.
let height = ui.spacing().slider_width;
let size = vec2(ui.available_size_before_wrap().x, height);
let (rect, response) = ui.allocate_at_least(size, Sense::hover());
let (rect, response) = ui.allocate_at_least(size, Sense::hover(), Vec2::ZERO); // TODO
let style = ui.style().noninteractive();
let graph_top_cpu_usage = 0.010;