mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Replace old types with type-defs
This commit is contained in:
@@ -1014,37 +1014,8 @@ fn clamp_to_range(x: f32, range: Rangef) -> f32 {
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
mod legacy {
|
#[deprecated = "Use Panel::left or Panel::right instead"]
|
||||||
#![expect(deprecated)]
|
pub type SidePanel = super::Panel;
|
||||||
|
|
||||||
use super::{Id, Panel};
|
#[deprecated = "Use Panel::top or Panel::bottom instead"]
|
||||||
|
pub type TopBottomPanel = super::Panel;
|
||||||
#[deprecated = "Use Panel::left or Panel::right instead"]
|
|
||||||
pub struct SidePanel {}
|
|
||||||
|
|
||||||
impl SidePanel {
|
|
||||||
pub fn left(id: impl Into<Id>) -> Panel {
|
|
||||||
Panel::left(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn right(id: impl Into<Id>) -> Panel {
|
|
||||||
Panel::right(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated = "Use Panel::top or Panel::bottom instead"]
|
|
||||||
pub struct TopBottomPanel {}
|
|
||||||
|
|
||||||
impl TopBottomPanel {
|
|
||||||
pub fn top(id: impl Into<Id>) -> Panel {
|
|
||||||
Panel::top(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn bottom(id: impl Into<Id>) -> Panel {
|
|
||||||
Panel::bottom(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[expect(deprecated)]
|
|
||||||
pub use legacy::{SidePanel, TopBottomPanel};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user