assistant2: Fix model selector position (#23721)
This PR makes the model selector not render on top of its trigger. <img width="800" alt="Screenshot 2025-01-27 at 12 02 01 PM" src="https://github.com/user-attachments/assets/76c5ac6f-ae27-4b3d-a80a-3027042c75f8" /> Release Notes: - N/A
This commit is contained in:
parent
b58c994706
commit
91f44725d9
1 changed files with 5 additions and 1 deletions
|
@ -146,8 +146,12 @@ impl<T: PopoverTrigger> RenderOnce for LanguageModelSelectorPopoverMenu<T> {
|
||||||
PopoverMenu::new("model-switcher")
|
PopoverMenu::new("model-switcher")
|
||||||
.menu(move |_window, _cx| Some(language_model_selector.clone()))
|
.menu(move |_window, _cx| Some(language_model_selector.clone()))
|
||||||
.trigger(self.trigger)
|
.trigger(self.trigger)
|
||||||
.attach(gpui::Corner::BottomLeft)
|
.anchor(gpui::Corner::BottomRight)
|
||||||
.when_some(self.handle.clone(), |menu, handle| menu.with_handle(handle))
|
.when_some(self.handle.clone(), |menu, handle| menu.with_handle(handle))
|
||||||
|
.offset(gpui::Point {
|
||||||
|
x: px(0.0),
|
||||||
|
y: px(-2.0),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue