Remove deprecated functions

This commit is contained in:
Emil Ernerfeldt 2021-10-30 09:46:06 +02:00
parent b551dfec81
commit 78dfde40b2
8 changed files with 0 additions and 80 deletions

View File

@ -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).

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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<SrgbTexture2d>) -> egui::TextureId {
use epi::NativeTexture as _;
self.register_native_texture(texture)
}
pub fn set_user_texture(
&mut self,
id: egui::TextureId,

View File

@ -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());

View File

@ -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());

View File

@ -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