Merge branch 'main' into panic-hunting

This commit is contained in:
Mikayla 2023-11-22 13:47:17 -08:00
commit 6e84d8fbc0
No known key found for this signature in database
29 changed files with 1343 additions and 1161 deletions

View file

@ -8,9 +8,7 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use theme2::ActiveTheme;
use ui::{
h_stack, menu_handle, ContextMenu, IconButton, InteractionState, Label, ListItem, Tooltip,
};
use ui::{h_stack, menu_handle, ContextMenu, IconButton, InteractionState, Tooltip};
pub enum PanelEvent {
ChangePosition,
@ -719,15 +717,9 @@ impl Render for PanelButtons {
&& panel.position_is_valid(position, cx)
{
let panel = panel.clone();
menu = menu.entry(
ListItem::new(
position.to_label(),
Label::new(format!("Dock {}", position.to_label())),
),
move |_, cx| {
panel.set_position(position, cx);
},
)
menu = menu.entry(position.to_label(), move |_, cx| {
panel.set_position(position, cx);
})
}
}
menu