From 78dfde40b2fbda8d44947b8ebf186eb42568a400 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 30 Oct 2021 09:46:06 +0200 Subject: [PATCH] Remove deprecated functions --- egui/src/containers/scroll_area.rs | 12 ------------ egui/src/containers/window.rs | 5 ----- egui/src/ui.rs | 20 -------------------- egui/src/widgets/text_edit/builder.rs | 5 ----- egui_glium/src/painter.rs | 7 ------- egui_web/src/webgl1.rs | 13 ------------- egui_web/src/webgl2.rs | 13 ------------- epaint/src/text/fonts.rs | 5 ----- 8 files changed, 80 deletions(-) diff --git a/egui/src/containers/scroll_area.rs b/egui/src/containers/scroll_area.rs index 040bf507..0514fdfa 100644 --- a/egui/src/containers/scroll_area.rs +++ b/egui/src/containers/scroll_area.rs @@ -114,18 +114,6 @@ impl ScrollArea { } } - /// Will make the area be as high as it is allowed to be (i.e. fill the [`Ui`] it is in) - #[deprecated = "Use pub ScrollArea::vertical() instead"] - pub fn auto_sized() -> Self { - Self::vertical() - } - - /// Use `f32::INFINITY` if you want the scroll area to expand to fit the surrounding Ui - #[deprecated = "Use pub ScrollArea::vertical().max_height(…) instead"] - pub fn from_max_height(max_height: f32) -> Self { - Self::vertical().max_height(max_height) - } - /// The maximum width of the outer frame of the scroll area. /// /// Use `f32::INFINITY` if you want the scroll area to expand to fit the surrounding `Ui` (default). diff --git a/egui/src/containers/window.rs b/egui/src/containers/window.rs index d4abd7fe..01545bb2 100644 --- a/egui/src/containers/window.rs +++ b/egui/src/containers/window.rs @@ -225,11 +225,6 @@ impl<'open> Window<'open> { self } - #[deprecated = "Use .vscroll(…) instead"] - pub fn scroll(self, scroll: bool) -> Self { - self.vscroll(scroll) - } - /// Constrain the area up to which the window can be dragged. pub fn drag_bounds(mut self, bounds: Rect) -> Self { self.area = self.area.drag_bounds(bounds); diff --git a/egui/src/ui.rs b/egui/src/ui.rs index f060698d..42010908 100644 --- a/egui/src/ui.rs +++ b/egui/src/ui.rs @@ -218,11 +218,6 @@ impl Ui { self.enabled } - #[deprecated = "Renamed to is_enabled"] - pub fn enabled(&self) -> bool { - self.enabled - } - /// Calling `set_enabled(false)` will cause the `Ui` to deny all future interaction /// and all the widgets will draw with a gray look. /// @@ -381,11 +376,6 @@ impl Ui { self.placer.max_rect() } - #[deprecated = "Use .max_rect() instead"] - pub fn max_rect_finite(&self) -> Rect { - self.max_rect() - } - /// Used for animation, kind of hacky pub(crate) fn force_set_min_rect(&mut self, min_rect: Rect) { self.placer.force_set_min_rect(min_rect); @@ -514,19 +504,9 @@ impl Ui { self.placer.available_rect_before_wrap().size() } - #[deprecated = "Use .available_size_before_wrap() instead"] - pub fn available_size_before_wrap_finite(&self) -> Vec2 { - self.available_size_before_wrap() - } - pub fn available_rect_before_wrap(&self) -> Rect { self.placer.available_rect_before_wrap() } - - #[deprecated = "Use .available_rect_before_wrap() instead"] - pub fn available_rect_before_wrap_finite(&self) -> Rect { - self.available_rect_before_wrap() - } } /// # `Id` creation diff --git a/egui/src/widgets/text_edit/builder.rs b/egui/src/widgets/text_edit/builder.rs index 55acfe38..5368e282 100644 --- a/egui/src/widgets/text_edit/builder.rs +++ b/egui/src/widgets/text_edit/builder.rs @@ -190,11 +190,6 @@ impl<'t> TextEdit<'t> { self } - #[deprecated = "Use TextEdit::interactive or ui.add_enabled instead"] - pub fn enabled(self, enabled: bool) -> Self { - self.interactive(enabled) - } - /// Default is `true`. If set to `false` there will be no frame showing that this is editable text! pub fn frame(mut self, frame: bool) -> Self { self.frame = frame; diff --git a/egui_glium/src/painter.rs b/egui_glium/src/painter.rs index 9801fecd..2febdc39 100644 --- a/egui_glium/src/painter.rs +++ b/egui_glium/src/painter.rs @@ -244,13 +244,6 @@ impl Painter { id } - #[cfg(feature = "epi")] - #[deprecated = "Use: `NativeTexture::register_native_texture` instead"] - pub fn register_glium_texture(&mut self, texture: Rc) -> egui::TextureId { - use epi::NativeTexture as _; - self.register_native_texture(texture) - } - pub fn set_user_texture( &mut self, id: egui::TextureId, diff --git a/egui_web/src/webgl1.rs b/egui_web/src/webgl1.rs index c997872f..aee2fada 100644 --- a/egui_web/src/webgl1.rs +++ b/egui_web/src/webgl1.rs @@ -217,19 +217,6 @@ impl WebGlPainter { } } - #[deprecated = "Use: `NativeTexture::register_native_texture` instead"] - pub fn register_webgl_texture(&mut self, texture: WebGlTexture) -> egui::TextureId { - let id = self.alloc_user_texture_index(); - if let Some(Some(user_texture)) = self.user_textures.get_mut(id) { - *user_texture = UserTexture { - size: (0, 0), - pixels: vec![], - gl_texture: Some(texture), - } - } - egui::TextureId::User(id as u64) - } - fn paint_mesh(&self, mesh: &egui::epaint::Mesh16) -> Result<(), JsValue> { debug_assert!(mesh.is_valid()); diff --git a/egui_web/src/webgl2.rs b/egui_web/src/webgl2.rs index 2eeb2aee..4d76cc05 100644 --- a/egui_web/src/webgl2.rs +++ b/egui_web/src/webgl2.rs @@ -202,19 +202,6 @@ impl WebGl2Painter { } } - #[deprecated = "Use: `NativeTexture::register_native_texture` instead"] - pub fn register_webgl_texture(&mut self, texture: WebGlTexture) -> egui::TextureId { - let id = self.alloc_user_texture_index(); - if let Some(Some(user_texture)) = self.user_textures.get_mut(id) { - *user_texture = UserTexture { - size: (0, 0), - pixels: vec![], - gl_texture: Some(texture), - } - } - egui::TextureId::User(id as u64) - } - fn paint_mesh(&self, mesh: &egui::epaint::Mesh16) -> Result<(), JsValue> { debug_assert!(mesh.is_valid()); diff --git a/epaint/src/text/fonts.rs b/epaint/src/text/fonts.rs index 040da120..cd242ba2 100644 --- a/epaint/src/text/fonts.rs +++ b/epaint/src/text/fonts.rs @@ -271,11 +271,6 @@ impl Fonts { } } - #[deprecated = "Renamed to Fonts::new"] - pub fn from_definitions(pixels_per_point: f32, definitions: FontDefinitions) -> Self { - Self::new(pixels_per_point, definitions) - } - #[inline(always)] pub fn pixels_per_point(&self) -> f32 { self.pixels_per_point