1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Make top/bottom panels un-resizable by default

This commit is contained in:
Emil Ernerfeldt
2025-11-16 19:29:38 +01:00
parent 0b75af5ac4
commit 8e4a63ce54

View File

@@ -332,15 +332,19 @@ impl Panel {
/// Create a top panel.
///
/// The id should be globally unique, e.g. `Id::new("my_top_panel")`.
///
/// By default this is NOT resizable.
pub fn top(id: impl Into<Id>) -> Self {
Self::new(PanelSide::TOP, id)
Self::new(PanelSide::TOP, id).resizable(false)
}
/// Create a bottom panel.
///
/// The id should be globally unique, e.g. `Id::new("my_bottom_panel")`.
///
/// By default this is NOT resizable.
pub fn bottom(id: impl Into<Id>) -> Self {
Self::new(PanelSide::BOTTOM, id)
Self::new(PanelSide::BOTTOM, id).resizable(false)
}
/// Create a panel.