From 36f57b64a1bf4de3d80aecd17ef5a6f1272f8546 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Mon, 10 Aug 2026 22:12:34 +0300 Subject: [PATCH] chore: replace SplitButton with a separate CheckButton in service setup dialog --- lact-gui/src/service_setup.rs | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lact-gui/src/service_setup.rs b/lact-gui/src/service_setup.rs index dd80e7f2..f456fd47 100644 --- a/lact-gui/src/service_setup.rs +++ b/lact-gui/src/service_setup.rs @@ -193,35 +193,35 @@ impl AsyncComponent for ServiceSetupDialog { set_hexpand: true, set_halign: gtk::Align::End, - adw::SplitButton { - set_label: &fl!(I18N, "service-start"), - connect_clicked => ServiceSetupDialogMsg::StartService, - add_css_class: "suggested-action", - - #[wrap(Some)] - set_popover = >k::Popover { - gtk::CheckButton { - set_label: Some(&fl!(I18N, "service-autostart")), - bind: &model.autostart_on_start, - }, - }, + gtk::CheckButton { + set_label: Some(&fl!(I18N, "service-autostart")), + bind: &model.autostart_on_start, #[watch] set_visible: model.service_state != systemd::UNIT_STATE_ACTIVE, }, - adw::SplitButton { + gtk::Button { + set_label: &fl!(I18N, "service-start"), + connect_clicked => ServiceSetupDialogMsg::StartService, + add_css_class: "suggested-action", + + #[watch] + set_visible: model.service_state != systemd::UNIT_STATE_ACTIVE, + }, + + gtk::CheckButton { + set_label: Some(&fl!(I18N, "service-autostart-disable")), + bind: &model.autostart_on_stop, + + #[watch] + set_visible: model.service_state == systemd::UNIT_STATE_ACTIVE, + }, + + gtk::Button { set_label: &fl!(I18N, "service-stop"), connect_clicked => ServiceSetupDialogMsg::StopService, - #[wrap(Some)] - set_popover = >k::Popover { - gtk::CheckButton { - set_label: Some(&fl!(I18N, "service-autostart-disable")), - bind: &model.autostart_on_stop, - }, - }, - #[watch] set_visible: model.service_state == systemd::UNIT_STATE_ACTIVE, },