fix(input-sources): remove extra divider and button

This commit is contained in:
Ashley Wulber 2024-05-14 21:51:19 -04:00 committed by Michael Murphy
parent 39623ad704
commit e57a832b2f

View file

@ -105,7 +105,7 @@ impl cosmic::Application for Window {
popup_settings.positioner.size_limits = Limits::NONE popup_settings.positioner.size_limits = Limits::NONE
.max_width(372.0) .max_width(372.0)
.min_width(300.0) .min_width(300.0)
.min_height(200.0) .min_height(1.)
.max_height(1080.0); .max_height(1080.0);
get_popup(popup_settings) get_popup(popup_settings)
} }
@ -184,16 +184,14 @@ impl cosmic::Application for Window {
applet::menu_button(group).on_press(Message::SetActiveLayout(layout.clone())), applet::menu_button(group).on_press(Message::SetActiveLayout(layout.clone())),
); );
} }
content_list = content_list.extend( if !self.active_layouts.is_empty() {
[ content_list = content_list.push(
applet::padded_control(widget::divider::horizontal::default()).apply(Element::from), applet::padded_control(widget::divider::horizontal::default()).apply(Element::from),
applet::menu_button(widget::text::body(fl!("show-keyboard-layout"))).into(), );
applet::padded_control(widget::divider::horizontal::default()).into(), }
applet::menu_button(widget::text::body(fl!("keyboard-settings"))) content_list = content_list.push(
.on_press(Message::KeyboardSettings) applet::menu_button(widget::text::body(fl!("keyboard-settings")))
.into(), .on_press(Message::KeyboardSettings),
]
.into_iter(),
); );
self.core.applet.popup_container(content_list).into() self.core.applet.popup_container(content_list).into()