Add Corner to geometry and make names of corner methods consistent (#22119)
Release Notes: - N/A
This commit is contained in:
parent
3052fc2565
commit
fc5a810408
39 changed files with 325 additions and 254 deletions
|
@ -3,10 +3,10 @@ use crate::{status_bar::StatusItemView, Workspace};
|
|||
use crate::{DraggedDock, Event, Pane};
|
||||
use client::proto;
|
||||
use gpui::{
|
||||
deferred, div, px, Action, AnchorCorner, AnyView, AppContext, Axis, Entity, EntityId,
|
||||
EventEmitter, FocusHandle, FocusableView, IntoElement, KeyContext, MouseButton, MouseDownEvent,
|
||||
MouseUpEvent, ParentElement, Render, SharedString, StyleRefinement, Styled, Subscription, View,
|
||||
ViewContext, VisualContext, WeakView, WindowContext,
|
||||
deferred, div, px, Action, AnyView, AppContext, Axis, Corner, Entity, EntityId, EventEmitter,
|
||||
FocusHandle, FocusableView, IntoElement, KeyContext, MouseButton, MouseDownEvent, MouseUpEvent,
|
||||
ParentElement, Render, SharedString, StyleRefinement, Styled, Subscription, View, ViewContext,
|
||||
VisualContext, WeakView, WindowContext,
|
||||
};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -719,10 +719,8 @@ impl Render for PanelButtons {
|
|||
let dock_position = dock.position;
|
||||
|
||||
let (menu_anchor, menu_attach) = match dock.position {
|
||||
DockPosition::Left => (AnchorCorner::BottomLeft, AnchorCorner::TopLeft),
|
||||
DockPosition::Bottom | DockPosition::Right => {
|
||||
(AnchorCorner::BottomRight, AnchorCorner::TopRight)
|
||||
}
|
||||
DockPosition::Left => (Corner::BottomLeft, Corner::TopLeft),
|
||||
DockPosition::Bottom | DockPosition::Right => (Corner::BottomRight, Corner::TopRight),
|
||||
};
|
||||
|
||||
let buttons = dock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue