Commit f39332ca authored by Roman Alifanov's avatar Roman Alifanov

when the user clicks on the row, the checkbox is activated

parent 50532fed
......@@ -7,13 +7,20 @@ class ApplicationRow(Adw.ActionRow):
super().__init__(title=app['name'], subtitle=app['dscr'])
self.app = app
self.is_installed = is_installed
self.set_selectable(False)
self.set_activatable(True)
self.checkbox = Gtk.CheckButton()
self.checkbox.add_css_class("selection-mode")
self.checkbox.set_valign(Gtk.Align.CENTER)
self.checkbox.set_halign(Gtk.Align.CENTER)
self.checkbox.set_active(is_installed)
self.checkbox.connect("toggled", self.on_checkbox_toggled)
self.add_suffix(self.checkbox)
self.connect("activated", lambda _: self.checkbox.activate())
self.on_toggle = on_toggle # Callback for when the checkbox is toggled
def on_checkbox_toggled(self, checkbox):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment