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

Add Rect left/right/top/bottom accessors

This commit is contained in:
Emil Ernerfeldt
2020-04-22 19:38:38 +02:00
parent 2a4828670e
commit 700c93b8e3
7 changed files with 53 additions and 41 deletions

View File

@@ -134,7 +134,7 @@ impl Style {
pub fn icon_rectangles(&self, rect: &Rect) -> (Rect, Rect) {
let box_side = 16.0;
let big_icon_rect = Rect::from_center_size(
pos2(rect.min().x + 4.0 + box_side * 0.5, rect.center().y),
pos2(rect.left() + 4.0 + box_side * 0.5, rect.center().y),
vec2(box_side, box_side),
);