From 9ad5356cfa07c5a467c9d93eebf0929902e89e82 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 26 Jan 2023 14:59:48 +0100 Subject: [PATCH] naming --- crates/egui/src/painter.rs | 6 +++--- crates/egui/src/ui.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/painter.rs b/crates/egui/src/painter.rs index ba8d2703..015a79cf 100644 --- a/crates/egui/src/painter.rs +++ b/crates/egui/src/painter.rs @@ -44,7 +44,7 @@ impl Painter { /// Redirect where you are painting. #[must_use] - pub fn with_layer(self, z_layer: ZLayer) -> Self { + pub fn with_z_layer(self, z_layer: ZLayer) -> Self { Self { ctx: self.ctx, z_layer, @@ -56,14 +56,14 @@ impl Painter { /// Redirect where you are painting with default z-index #[must_use] pub fn with_layer_id(self, layer: AreaLayerId) -> Self { - self.with_layer(ZLayer::from_area_layer(layer)) + self.with_z_layer(ZLayer::from_area_layer(layer)) } /// Redirect z-index #[must_use] pub fn with_z(self, z: ZOrder) -> Self { let layer = self.z_layer.area_layer.with_z(z); - self.with_layer(layer) + self.with_z_layer(layer) } /// Create a painter for a sub-region of this [`Painter`]. diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index b2776db2..3252d908 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -1770,7 +1770,7 @@ impl Ui { } /// Set z-index and layer id at the same time - pub fn with_layer( + pub fn with_z_layer( &mut self, layer: ZLayer, add_contents: impl FnOnce(&mut Self) -> R,