Add Corner to geometry and make names of corner methods consistent (#22119)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2024-12-16 22:57:15 -07:00 committed by GitHub
parent 3052fc2565
commit fc5a810408
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 325 additions and 254 deletions

View file

@ -1,4 +1,4 @@
use gpui::{actions, AnchorCorner, Render, View};
use gpui::{actions, Corner, Render, View};
use story::Story;
use crate::prelude::*;
@ -47,8 +47,8 @@ impl Render for ContextMenuStory {
.child(
right_click_menu("test1")
.trigger(Label::new("BOTTOM LEFT"))
.anchor(AnchorCorner::BottomLeft)
.attach(AnchorCorner::TopLeft)
.anchor(Corner::BottomLeft)
.attach(Corner::TopLeft)
.menu(move |cx| build_menu(cx, "bottom left")),
),
)
@ -60,14 +60,14 @@ impl Render for ContextMenuStory {
.child(
right_click_menu("test3")
.trigger(Label::new("TOP RIGHT"))
.anchor(AnchorCorner::TopRight)
.anchor(Corner::TopRight)
.menu(move |cx| build_menu(cx, "top right")),
)
.child(
right_click_menu("test4")
.trigger(Label::new("BOTTOM RIGHT"))
.anchor(AnchorCorner::BottomRight)
.attach(AnchorCorner::TopRight)
.anchor(Corner::BottomRight)
.attach(Corner::TopRight)
.menu(move |cx| build_menu(cx, "bottom right")),
),
)