settings_ui: Add theme settings controls (#15115)
This PR adds settings controls for the theme settings. Release Notes: - N/A
This commit is contained in:
parent
325e6b9fef
commit
740c444089
11 changed files with 392 additions and 156 deletions
|
@ -42,8 +42,9 @@ impl Disableable for DropdownMenu {
|
|||
impl RenderOnce for DropdownMenu {
|
||||
fn render(self, _cx: &mut WindowContext) -> impl IntoElement {
|
||||
PopoverMenu::new(self.id)
|
||||
.full_width(self.full_width)
|
||||
.menu(move |_cx| Some(self.menu.clone()))
|
||||
.trigger(DropdownMenuTrigger::new(self.label))
|
||||
.trigger(DropdownMenuTrigger::new(self.label).full_width(self.full_width))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,6 +69,11 @@ impl DropdownMenuTrigger {
|
|||
on_click: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn full_width(mut self, full_width: bool) -> Self {
|
||||
self.full_width = full_width;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Disableable for DropdownMenuTrigger {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue