Skip to content

Commit

Permalink
fix: background was not expanded for top level objects
Browse files Browse the repository at this point in the history
  • Loading branch information
GwnDaan committed Dec 12, 2024
1 parent fd7c20f commit 6abb94e
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions src/object_rendering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,31 +142,37 @@ impl RenderableObject for WorkingSet {
return;
}

egui::Frame::none()
.fill(pool.color_by_index(self.background_colour).convert())
.show(ui, |ui| {
render_object_refs(ui, pool, &self.object_refs);
});
ui.painter().rect_filled(
ui.available_rect_before_wrap(),
0.0,
pool.color_by_index(self.background_colour).convert(),
);

render_object_refs(ui, pool, &self.object_refs);
}
}

impl RenderableObject for DataMask {
fn render(&self, ui: &mut egui::Ui, pool: &ObjectPool, _: Point<i16>) {
egui::Frame::none()
.fill(pool.color_by_index(self.background_colour).convert())
.show(ui, |ui| {
render_object_refs(ui, pool, &self.object_refs);
});
ui.painter().rect_filled(
ui.available_rect_before_wrap(),
0.0,
pool.color_by_index(self.background_colour).convert(),
);

render_object_refs(ui, pool, &self.object_refs);
}
}

impl RenderableObject for AlarmMask {
fn render(&self, ui: &mut egui::Ui, pool: &ObjectPool, _: Point<i16>) {
egui::Frame::none()
.fill(pool.color_by_index(self.background_colour).convert())
.show(ui, |ui| {
render_object_refs(ui, pool, &self.object_refs);
});
ui.painter().rect_filled(
ui.available_rect_before_wrap(),
0.0,
pool.color_by_index(self.background_colour).convert(),
);

render_object_refs(ui, pool, &self.object_refs);
}
}

Expand Down

0 comments on commit 6abb94e

Please sign in to comment.