mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Add drag-to-open for collapsible panels (#8363)
A fully collapsed `show_collapsible` panel now leaves a thin grab handle at its fixed edge, invisible until hovered. Dragging it out past `min_size` (or double-clicking it) reopens the panel. Opt out with `panel.drag_to_open(false)`. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -94,10 +94,10 @@ impl crate::View for Panels {
|
||||
bottom,
|
||||
egui::Panel::bottom("bottom_panel_collapsed")
|
||||
.resizable(true)
|
||||
.default_size(20.0),
|
||||
.exact_size(20.0),
|
||||
egui::Panel::bottom("bottom_panel_expanded")
|
||||
.resizable(true)
|
||||
.max_size(128.0),
|
||||
.size_range(64.0..=128.0),
|
||||
|ui, expanded| {
|
||||
if expanded {
|
||||
ui.vertical_centered(|ui| {
|
||||
|
||||
Reference in New Issue
Block a user