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

Store Margin using i8 to reduce its size (#5567)

Adds `Marginf` to fill the previous niche.

This is all in a pursuit to shrink the sizes of often-used structs, to
improve performance (less cache misses, less memcpy:s, etc).

* On the path towards https://github.com/emilk/egui/issues/4019
This commit is contained in:
Emil Ernerfeldt
2025-01-02 16:05:52 +01:00
committed by GitHub
parent aeea70d9e7
commit d58d13781d
12 changed files with 449 additions and 107 deletions

View File

@@ -128,7 +128,7 @@ impl crate::View for PanZoom {
ui.set_clip_rect(transform.inverse() * rect);
egui::Frame::default()
.rounding(egui::Rounding::same(4))
.inner_margin(egui::Margin::same(8.0))
.inner_margin(egui::Margin::same(8))
.stroke(ui.ctx().style().visuals.window_stroke)
.fill(ui.style().visuals.panel_fill)
.show(ui, |ui| {